:root {
  /* Guppshup Enterprise brand (same tokens as the website) */
  --bg: #f6f8fc;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --border: #e3e8f2;
  --text: #0a1633;
  --muted: #55617a;
  --primary: #2f6bff;
  --primary-2: #1843c4;
  --primary-soft: rgba(47, 107, 255, 0.10);
  --accent: #ff7a1a;
  --accent-2: #ffa043;
  --accent-soft: rgba(255, 122, 26, 0.12);
  --navy: #0a1633;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  --success: #10b981;
  --wa: #22c55e;
  --danger: #ef4444;
  --shadow: 0 1px 2px rgb(10 22 51 / 0.04), 0 8px 24px -8px rgb(10 22 51 / 0.10);
  --shadow-lg: 0 2px 4px rgb(10 22 51 / 0.04), 0 24px 48px -16px rgb(10 22 51 / 0.22);
  --glow: 0 10px 30px -10px rgb(47 107 255 / 0.55);
  --glow-accent: 0 10px 30px -10px rgb(255 122 26 / 0.6);
  --radius: 16px;
  --grad: linear-gradient(135deg, var(--primary), var(--primary-2));
  --grad-accent: linear-gradient(135deg, var(--accent-2), var(--accent));
  --grad-text: linear-gradient(100deg, #2f6bff 0%, #6a5cff 45%, #ff7a1a 100%);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #050b1f;
  --surface: rgba(15, 32, 73, 0.62);
  --surface-solid: #0a1633;
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef4ff;
  --muted: #9aa8c7;
  --primary: #5b8cff;
  --primary-soft: rgba(91, 140, 255, 0.16);
  --accent-soft: rgba(255, 160, 67, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }

/* Background glow blobs */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-blobs span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .22; }
.bg-blobs span:nth-child(1) { width: 380px; height: 380px; background: #5b8cff; top: -120px; left: -100px; }
.bg-blobs span:nth-child(2) { width: 320px; height: 320px; background: #ffa043; top: 30%; right: -140px; }
.bg-blobs span:nth-child(3) { width: 280px; height: 280px; background: #8fb3ff; bottom: -120px; left: 20%; opacity: .2; }
:root[data-theme="dark"] .bg-blobs span { opacity: .22; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { border-radius: 10px; box-shadow: 0 4px 14px rgb(47 107 255 / .35); }
.brand h1 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--text); }
.brand p { margin: 3px 0 0; font-size: 10.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--primary); line-height: 1; }
.top-actions { display: flex; gap: 6px; position: relative; }

.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  transition: transform .15s, background .2s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn.small { width: 34px; height: 34px; border-radius: 10px; }
.icon-btn.small svg { width: 18px; height: 18px; }
#menuBtn svg circle { fill: currentColor; stroke: none; }

.menu {
  position: absolute; right: 0; top: 48px; min-width: 220px;
  background: var(--surface-solid); border: 1px solid var(--border);
  border-radius: 14px; padding: 6px; box-shadow: var(--shadow-lg);
  animation: pop .16s ease-out;
}
.menu button {
  display: block; width: 100%; text-align: left; padding: 11px 12px;
  border: 0; background: none; border-radius: 10px; font-size: 14px;
}
.menu button:hover { background: var(--primary-soft); }

/* Layout */
.container { max-width: 960px; margin: 0 auto; padding: 16px 16px calc(110px + var(--safe-b)); }

/* Install card */
.install-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; margin-bottom: 16px; border-radius: var(--radius);
  background: var(--grad); color: #fff;
  box-shadow: 0 12px 30px rgb(47 107 255 / .35);
  animation: slideDown .35s ease-out;
}
.install-icon img { border-radius: 12px; background: rgba(255,255,255,.2); padding: 4px; display: block; }
.install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.install-text strong { font-size: 15px; }
.install-text span { font-size: 12.5px; opacity: .9; }
.install-actions { display: flex; align-items: center; gap: 6px; }
.install-card .btn-primary { background: #fff; color: var(--primary); box-shadow: none; }
.install-card .icon-btn { background: rgba(255,255,255,.18); border-color: transparent; color: #fff; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat {
  padding: 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.stat-label { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -.03em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Toolbar */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; }
.search {
  flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 0 14px; height: 48px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  color: var(--muted); transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); height: 100%; }
.toolbar select {
  height: 48px; padding: 0 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  outline: 0;
}

/* List */
.list { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .list { grid-template-columns: 1fr 1fr; } }

.card {
  padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
  animation: fadeUp .28s ease-out both;
  transition: transform .2s, box-shadow .2s;
}
@media (hover: hover) { .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); } }
.card-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.avatar {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; font-size: 16px; color: #fff;
}
.card-title { min-width: 0; flex: 1; }
.card-title h3 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; max-width: 100%;
  font-size: 12px; font-weight: 600; color: var(--primary);
  background: var(--primary-soft); padding: 2px 8px; border-radius: 999px;
}
.biz span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-menu { display: flex; gap: 4px; }
.card-menu .icon-btn { background: transparent; border-color: transparent; color: var(--muted); }
.card-menu .icon-btn:hover { background: var(--primary-soft); color: var(--primary); }
.card-menu .icon-btn.del:hover { background: rgba(239,68,68,.12); color: var(--danger); }

.info { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.info-row { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); min-width: 0; }
.info-row svg { width: 16px; height: 16px; margin-top: 2px; }
.info-row span { color: var(--text); word-break: break-word; }

.card-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.act {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; border-radius: 12px; text-decoration: none;
  font-size: 13px; font-weight: 600; border: 1px solid var(--border);
  background: var(--surface-solid); color: var(--text); transition: transform .12s;
}
.act:active { transform: scale(.96); }
.act svg { width: 17px; height: 17px; }
.act.call { color: var(--primary); }
.act.wa { color: var(--wa); }
.act.map { color: #f59e0b; }
.act.disabled { opacity: .4; pointer-events: none; }

mark { background: rgba(250, 204, 21, .45); color: inherit; border-radius: 3px; padding: 0 1px; }

/* Empty */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-art { font-size: 54px; margin-bottom: 8px; }
.empty h2 { color: var(--text); margin: 0 0 6px; font-size: 19px; }
.empty p { margin: 0 0 18px; }

/* Buttons */
.btn {
  height: 46px; padding: 0 20px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; transition: transform .12s, filter .2s;
}
.btn:active { transform: scale(.97); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 11px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgb(47 107 255 / .35); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: var(--primary-soft); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }

/* FAB */
.fab {
  position: fixed; right: 18px; bottom: calc(20px + var(--safe-b)); z-index: 15;
  display: flex; align-items: center; gap: 8px;
  height: 56px; padding: 0 22px 0 18px; border: 0; border-radius: 18px;
  background: var(--grad-accent); color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: var(--glow-accent);
  transition: transform .15s;
}
.fab svg { width: 24px; height: 24px; stroke-width: 2.6; }
.fab:active { transform: scale(.94); }

/* Dialogs */
dialog { border: 0; padding: 0; color: var(--text); background: transparent; max-width: 100vw; }
dialog::backdrop { background: rgba(8, 8, 20, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

.sheet > :is(form, .sheet-body), .modal .confirm {
  background: var(--surface-solid); box-shadow: var(--shadow-lg);
}
.sheet {
  width: 100%; margin: auto auto 0; max-height: 92dvh;
}
.sheet > :is(form, .sheet-body) {
  border-radius: 24px 24px 0 0; padding: 8px 18px calc(18px + var(--safe-b));
  animation: sheetUp .28s cubic-bezier(.2,.9,.3,1.1);
  max-height: 92dvh; overflow-y: auto;
}
.sheet-handle { width: 40px; height: 5px; border-radius: 9px; background: var(--border); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
@media (min-width: 640px) {
  .sheet { width: 520px; margin: auto; }
  .sheet > :is(form, .sheet-body) { border-radius: 24px; padding: 18px 24px 24px; animation: pop .22s ease-out; }
  .sheet-handle { display: none; }
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field label em { color: var(--danger); font-style: normal; }
.field input, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: 13px; font-size: 16px; /* 16px stops iOS zoom */
  background: var(--bg); border: 1.5px solid var(--border); outline: 0; resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.phone-wrap { display: flex; gap: 8px; }
.phone-wrap input { flex: 1; min-width: 0; }
.quick {
  width: 50px; flex-shrink: 0; display: grid; place-items: center; border-radius: 13px;
  color: #fff; text-decoration: none; transition: transform .12s, opacity .2s;
}
.quick:active { transform: scale(.94); }
.quick.call { background: var(--grad); box-shadow: 0 6px 16px rgb(47 107 255 / .35); }
.quick.wa { background: var(--wa); box-shadow: 0 6px 16px rgba(34,197,94,.35); }
.quick.disabled { opacity: .3; pointer-events: none; box-shadow: none; }
a.info-row { text-decoration: none; }
a.info-row span { color: var(--primary); font-weight: 600; }
.field .err { display: none; color: var(--danger); font-size: 12px; }
.field.invalid input { border-color: var(--danger); }
.field.invalid .err { display: block; }

.sheet-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 6px; }

.modal { margin: auto; width: min(380px, calc(100vw - 32px)); }
.confirm { border-radius: 22px; padding: 22px; text-align: center; animation: pop .2s ease-out; }
.confirm-icon { font-size: 40px; }
.confirm h3 { margin: 8px 0 4px; font-size: 18px; }
.confirm p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.confirm .sheet-actions { grid-template-columns: 1fr 1fr; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #111827; color: #fff; padding: 11px 18px; border-radius: 12px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); white-space: nowrap;
  transition: opacity .25s, transform .25s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

@media (max-width: 420px) {
  .stat { padding: 12px; }
  .stat-value { font-size: 22px; }
  .toolbar select { width: 104px; }
  .fab span { display: none; }
  .fab { width: 60px; padding: 0; justify-content: center; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Tabs ---------- */
.tabs {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin-bottom: 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.tab {
  position: relative; z-index: 1; height: 42px; border: 0; background: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 14px; color: var(--muted); transition: color .2s;
}
.tab svg { width: 18px; height: 18px; }
.tab.active { color: #fff; }
.tab-pill {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 6px);
  border-radius: 12px; background: var(--grad); box-shadow: 0 6px 16px rgb(47 107 255 / .35);
  transition: transform .28s cubic-bezier(.2,.9,.3,1.1);
}
.tabs[data-active="reminders"] .tab-pill { transform: translateX(calc(100% + 4px)); }
.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 800;
  display: inline-grid; place-items: center;
}

.stat-btn { text-align: left; font: inherit; color: inherit; cursor: pointer; }
.stat-btn.alert { border-color: rgba(239,68,68,.35); }
.stat-btn.alert .stat-value { background: linear-gradient(135deg, #ef4444, #f97316); -webkit-background-clip: text; background-clip: text; }

/* ---------- Reminder chip on client card ---------- */
.rem-chip {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0;
  padding: 9px 12px; border-radius: 12px; font-size: 13px; text-align: left;
  background: var(--primary-soft); color: var(--primary); border: 1px solid transparent;
}
.rem-chip svg { width: 16px; height: 16px; }
.rem-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rem-chip.add { background: transparent; border: 1.5px dashed var(--border); color: var(--muted); font-weight: 600; }
.rem-chip.add:hover { border-color: var(--primary); color: var(--primary); }
.rem-chip.overdue { background: rgba(239,68,68,.12); color: var(--danger); }

/* ---------- Reminders view ---------- */
.rem-group { margin-bottom: 20px; }
.group-title {
  display: flex; align-items: center; gap: 8px; margin: 0 4px 10px;
  font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
.group-title span {
  font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary);
}
.group-title.bad { color: var(--danger); }
.group-title.bad span { background: rgba(239,68,68,.12); color: var(--danger); }
.group-title.ok { color: var(--success); }
.group-title.ok span { background: rgba(16,185,129,.12); color: var(--success); }

.rem-card {
  padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
  border-left: 4px solid var(--primary);
  animation: fadeUp .28s ease-out both;
}
.rem-card.overdue { border-left-color: var(--danger); }
.rem-card.done { border-left-color: var(--success); opacity: .7; }
.rem-card.done h3 { text-decoration: line-through; }
.avatar.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }
.rem-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; min-width: 0; font-size: 12px; }
.rem-meta .muted { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.type-badge { flex-shrink: 0; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.type-badge.call { background: var(--primary-soft); color: var(--primary); }
.type-badge.meeting { background: rgba(245,158,11,.14); color: #d97706; }
.rem-when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.rem-when svg { width: 16px; height: 16px; color: var(--muted); }
.pill { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }
.pill.bad { background: rgba(239,68,68,.12); color: var(--danger); }
.pill.ok { background: rgba(16,185,129,.12); color: var(--success); }
.rem-note {
  margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 14px;
  background: var(--bg); color: var(--text); white-space: pre-wrap; word-break: break-word;
}
.act.done { color: var(--success); }
button.act { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }

.notify-card {
  display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 16px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.notify-icon { font-size: 28px; }
.notify-card .install-text span { color: var(--muted); opacity: 1; }

/* ---------- Reminder form ---------- */
.field select {
  width: 100%; padding: 13px 14px; border-radius: 13px; font-size: 16px;
  background: var(--bg); border: 1.5px solid var(--border); outline: 0;
}
.field select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.field.invalid select, .field.invalid .dt-row input { border-color: var(--danger); }
.rem-for {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 14px;
  border-radius: 14px; background: var(--primary-soft);
}
.rem-for div:last-child { display: flex; flex-direction: column; min-width: 0; }
.rem-for span { font-size: 12px; color: var(--muted); }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 13px;
  border: 1.5px solid var(--border); background: var(--bg); font-weight: 700; font-size: 14px; color: var(--text);
  cursor: pointer; transition: all .15s;
}
.seg input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.seg input:focus-visible + span { box-shadow: 0 0 0 4px var(--primary-soft); }

.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--bg); font-size: 13px; font-weight: 700; color: var(--text);
}
.chips button.on { background: var(--grad); color: #fff; border-color: transparent; }
.dt-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin-top: 8px; }
.dt-row input { min-width: 0; }
:root[data-theme="dark"] .toast { background: #f1f2ff; color: #0f172a; }

/* ---------- Auth / boot ---------- */
.login { display: none; }
body.signed-out .login {
  display: grid; place-items: center; min-height: 100dvh; padding: 24px 16px;
}
body.signed-out .topbar, body.signed-out main, body.signed-out .fab,
body.booting .topbar, body.booting main, body.booting .fab { display: none; }
.login-card {
  width: min(400px, 100%); padding: 28px 22px; border-radius: 24px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  animation: pop .3s ease-out;
}
.login-card img { border-radius: 18px; box-shadow: 0 10px 26px rgb(47 107 255 / .4); }
.login-card h1 { margin: 14px 0 2px; font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.login-card > p { margin: 0 0 20px; color: var(--muted); }
.login-card .field { text-align: left; }
.login-card .btn { width: 100%; margin-top: 4px; }
.login-err { margin: 0 0 12px; color: var(--danger); font-size: 13px; font-weight: 600; text-align: left; }
.btn:disabled { opacity: .6; pointer-events: none; }
.hint { color: var(--muted); font-size: 12px; }

/* ---------- Menu extras ---------- */
.menu-user { padding: 10px 12px 8px; display: flex; flex-direction: column; }
.menu-user b { font-size: 14px; }
.menu-user span { font-size: 12px; color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 6px; }
.menu button.danger { color: var(--danger); }

/* ---------- Users dialog ---------- */
.user-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.user-row {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--border);
}
.user-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user-info b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info span { font-size: 12px; color: var(--muted); }
.sub-head { margin: 0 0 12px; font-size: 15px; font-weight: 800; }
.by { font-size: 12px; color: var(--muted); }

/* ---------- Client card: open details + last note ---------- */
.card-open { display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; cursor: pointer; border-radius: 12px; outline: 0; }
.card-open:focus-visible { box-shadow: 0 0 0 3px var(--primary-soft); }
.last-note {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; text-align: left;
  padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg);
  font-size: 13px; color: var(--muted);
}
.last-note b { flex-shrink: 0; color: var(--text); font-weight: 700; }
.last-note .ln-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Details sheet ---------- */
.sheet.tall > .sheet-body { min-height: min(80dvh, 720px); }
.dh { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.avatar.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 19px; }
.dh-info { flex: 1; min-width: 0; }
.dh-info h3 { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
#detailHead .info { margin-bottom: 12px; }
.card-actions.four { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.card-actions.four .act { flex-direction: column; gap: 2px; height: 56px; font-size: 12px; }
.act.rem { color: var(--primary-2); }

.up-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.up-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 14px; background: var(--primary-soft); }
.up-row.overdue { background: rgba(239,68,68,.12); }
.up-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; padding: 4px 0; }
.up-text { min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.up-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-text small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-row.overdue .up-text b { color: var(--danger); }
.icon-btn.ok { color: var(--success); background: var(--surface-solid); }

.composer {
  padding: 12px; border-radius: 16px; margin-bottom: 18px;
  background: var(--bg); border: 1.5px solid var(--border); transition: border-color .2s, box-shadow .2s;
}
.composer:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.composer textarea {
  width: 100%; border: 0; outline: 0; background: none; resize: none; font-size: 16px;
  padding: 8px 2px; min-height: 56px;
}
.kind-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.kind-chips::-webkit-scrollbar { display: none; }
.kind-chips label { position: relative; flex-shrink: 0; }
.kind-chips input { position: absolute; opacity: 0; pointer-events: none; }
.kind-chips span {
  display: block; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer;
  background: var(--surface-solid); border: 1px solid var(--border); color: var(--muted); transition: all .15s;
}
.kind-chips input:checked + span { background: var(--grad); color: #fff; border-color: transparent; }
.kind-chips input:focus-visible + span { box-shadow: 0 0 0 3px var(--primary-soft); }
.composer-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Timeline */
#timeline { padding-bottom: 8px; }
.tl-day { margin: 14px 0 8px; font-size: 12px; font-weight: 800; color: var(--muted); }
.tl-item { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.tl-item::before {
  content: ''; position: absolute; left: 17px; top: 38px; bottom: 0; width: 2px; background: var(--border);
}
.tl-dot {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center;
  font-size: 16px; background: var(--primary-soft);
}
.tl-dot.k-call { background: rgb(47 107 255 / .14); }
.tl-dot.k-meeting { background: rgba(245,158,11,.16); }
.tl-dot.k-whatsapp { background: rgba(34,197,94,.16); }
.tl-dot.k-done { background: rgba(16,185,129,.16); }
.tl-dot.k-added { background: rgba(168,85,247,.14); }
.tl-body { flex: 1; min-width: 0; padding-top: 2px; }
.tl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-top b { font-size: 14px; }
.tl-meta { font-size: 12px; color: var(--muted); }
.tl-tools { margin-left: auto; display: flex; gap: 2px; }
.icon-btn.tiny { width: 28px; height: 28px; border-radius: 8px; border-color: transparent; background: transparent; color: var(--muted); }
.icon-btn.tiny svg { width: 15px; height: 15px; }
.icon-btn.tiny.del:hover { color: var(--danger); }
.tl-body p {
  margin: 6px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 14px;
  background: var(--surface-solid); border: 1px solid var(--border); white-space: pre-wrap; word-break: break-word;
}
.opt { font-weight: 500; color: var(--muted); }
.kind-chips { flex-wrap: wrap; overflow: visible; }

/* =========================================================
   Polish pass — cleaner cards & controls on small phones
   ========================================================= */
.card { gap: 10px; padding: 14px; }
.card-head.card-open { cursor: pointer; border-radius: 14px; margin: -4px; padding: 4px; }
.card-head.card-open:active { background: var(--primary-soft); }
.chev { margin-left: auto; color: var(--muted); opacity: .6; display: grid; place-items: center; }
.chev svg { width: 18px; height: 18px; }
.card-title h3 { font-size: 16px; line-height: 1.25; }
.info { gap: 4px; }
.info-row { font-size: 14px; line-height: 1.35; }
a.info-row.addr span { color: var(--text); font-weight: 400; }
a.info-row.addr:active span { color: var(--primary); }

.last-note {
  padding: 0; border: 0; background: none; gap: 6px; font-size: 13px;
}
.last-note .ln-kind { flex-shrink: 0; }
.last-note .ln-text { flex: 1; min-width: 0; color: var(--muted); }
.last-note .ln-ago { flex-shrink: 0; font-size: 12px; color: var(--muted); opacity: .8; }

.rem-chip { padding: 8px 12px; font-size: 13px; }
.card-actions { gap: 8px; }
.act { height: 42px; border-radius: 12px; }
.act.rem { color: var(--primary-2); }

/* Reminder cards */
.rem-card { padding: 14px; gap: 10px; border-left-width: 3px; }
.rem-meta .muted { min-width: 0; }
.by { font-size: 12px; color: var(--muted); margin-top: -4px; }
.rem-when { font-size: 14px; }

/* Choice chips → tidy grid (no hidden overflow) */
.chips.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; overflow: visible; }
.chips.grid3 button { width: 100%; padding: 0 6px; height: 40px; border-radius: 12px; }

/* Note type: 4 equal segments */
.kind-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.kind-chips label { min-width: 0; }
.kind-chips span {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 2px; border-radius: 12px; font-size: 11.5px; text-align: center;
}
.kind-chips span i { font-style: normal; font-size: 17px; line-height: 1; }

/* Reminder edit extras */
.rem-extra { display: flex; justify-content: space-between; gap: 8px; margin: -2px 0 12px; }
.link-btn { border: 0; background: none; padding: 8px 0; font-size: 14px; font-weight: 700; color: var(--primary); }
.link-btn.danger { color: var(--danger); }

/* Quick call buttons: neutral until a full number is typed */
.quick.disabled { background: var(--border); color: var(--muted); opacity: 1; }

/* Details header buttons */
.dh .icon-btn + .icon-btn { margin-left: -4px; }
.dh .icon-btn.del:hover { color: var(--danger); }

/* Small phones */
@media (max-width: 380px) {
  .container { padding-left: 12px; padding-right: 12px; }
  .stats { gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat-label { font-size: 11.5px; }
  .tab { font-size: 13.5px; gap: 6px; }
  .act { font-size: 12.5px; gap: 4px; }
  .act svg { width: 16px; height: 16px; }
  .sheet > :is(form, .sheet-body) { padding-left: 14px; padding-right: 14px; }
  .card-actions.four .act { font-size: 11.5px; }
}
/* Keep title + close visible while scrolling the details sheet */
.sheet.tall .sheet-head {
  position: sticky; top: -8px; z-index: 3; margin: -8px -18px 8px; padding: 12px 18px 10px;
  background: var(--surface-solid); border-bottom: 1px solid transparent; transition: border-color .2s;
}
@media (max-width: 380px) { .sheet.tall .sheet-head { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; } }
@media (min-width: 640px) { .sheet.tall .sheet-head { top: -18px; margin: -18px -24px 8px; padding: 18px 24px 10px; } }

/* ================= Guppshup branding & lead pipeline ================= */
.brand-mark { width: 36px; height: 36px; border-radius: 10px; box-shadow: var(--glow); }
.btn-primary { box-shadow: var(--glow); }
.btn-accent { background: var(--grad-accent); color: #fff; box-shadow: var(--glow-accent); }
.login-card .brand-word { font-family: var(--font-display); }
.login-card .brand-sub { margin: 4px 0 18px; font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--primary); }

/* Status filter */
.status-filter { margin: -4px 0 14px; }
.status-filter button { display: inline-flex; align-items: center; gap: 6px; }
.status-filter button i { font-style: normal; font-size: 11px; font-weight: 800; padding: 0 6px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }
.status-filter button.on i { background: rgba(255,255,255,.25); color: #fff; }

/* Status + source badges */
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.st { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 0; line-height: 1.6; }
button.st { cursor: pointer; font-family: inherit; }
.st-new { background: var(--accent-soft); color: var(--accent); }
.st-contacted { background: var(--primary-soft); color: var(--primary); }
.st-interested { background: rgba(124, 92, 255, .14); color: #6a5cff; }
.st-won { background: rgba(16, 185, 129, .14); color: #059669; }
.st-lost { background: rgba(100, 116, 139, .16); color: var(--muted); }
.src-web { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .src-web { background: #1a2f63; }
.svc { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.card.is-new { border-color: rgba(255, 122, 26, .45); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }

/* Status picker in details */
.status-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 4px 0 14px; }
.status-pick button { height: 38px; border-radius: 11px; border: 1.5px solid var(--border); background: var(--bg); font: inherit; font-size: 12px; font-weight: 700; color: var(--text); padding: 0 2px; }
.status-pick button.on { border-color: transparent; color: #fff; background: var(--grad); }
.status-pick button.on[data-status="new"] { background: var(--grad-accent); }
.status-pick button.on[data-status="won"] { background: linear-gradient(135deg, #10b981, #059669); }
.status-pick button.on[data-status="lost"] { background: #64748b; }
@media (max-width: 420px) { .status-pick button { font-size: 11px; } }
.field select.full { margin: 0; }
.info-row.mail span { word-break: break-all; }
#statNewBtn.alert { border-color: rgba(255, 122, 26, .4); }
#statNewBtn.alert .stat-value { background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; }

/* =====================================================================
   Website design system — same look as guppshup.abmapplication.com
   (white surfaces, pill buttons, brand-600 actions, eyebrow labels,
   hero background with soft grid, official logo)
   ===================================================================== */
:root {
  --brand-50: #eef4ff; --brand-100: #dbe7ff; --brand-200: #bfd3ff; --brand-600: #1d55f0; --brand-700: #1843c4;
  --bg: #ffffff;
  --field-bg: #ffffff;
  --surface: #ffffff;
  --line: #e3e8f2;
  --shadow: 0 1px 2px rgb(10 22 51 / 0.04), 0 8px 24px -8px rgb(10 22 51 / 0.10);
  --shadow-lg: 0 2px 4px rgb(10 22 51 / 0.04), 0 24px 48px -16px rgb(10 22 51 / 0.18);
  --soft-bg: #f6f8fc;
  --page-pad: max(16px, calc((100% - 960px) / 2 + 16px));
}
:root[data-theme="dark"] {
  --brand-50: rgba(91, 140, 255, 0.12); --brand-100: rgba(91, 140, 255, 0.22); --brand-200: rgba(91, 140, 255, 0.4);
  --brand-600: #3f74ff; --brand-700: #8fb3ff;
  --bg: #050b1f; --field-bg: #0a1633; --surface: #0a1633; --soft-bg: #0f2049;
}
body { background: var(--bg); }

/* Background = website hero: soft blue wash, faint grid, two glows */
.bg-blobs { background: linear-gradient(to bottom, rgb(238 244 255 / .75), #fff 420px); }
.bg-blobs::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(to right, rgb(10 22 51 / .05) 1px, transparent 1px), linear-gradient(to bottom, rgb(10 22 51 / .05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000, transparent);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000, transparent);
}
.bg-blobs span { filter: blur(64px); }
.bg-blobs span:nth-child(1) { width: 520px; height: 520px; background: #5b8cff; opacity: .2; top: -160px; right: -160px; left: auto; }
.bg-blobs span:nth-child(2) { width: 360px; height: 360px; background: #ffa043; opacity: .15; top: 33%; left: -130px; right: auto; }
.bg-blobs span:nth-child(3) { display: none; }
:root[data-theme="dark"] .bg-blobs { background: linear-gradient(to bottom, #0a1633, #050b1f 420px); }
:root[data-theme="dark"] .bg-blobs::before { background-image: linear-gradient(to right, rgb(255 255 255 / .05) 1px, transparent 1px), linear-gradient(to bottom, rgb(255 255 255 / .05) 1px, transparent 1px); }
body.signed-out .bg-blobs, body.booting .bg-blobs { z-index: -1; }

/* Logo (light / dark variants) */
.logo { display: block; height: 34px; width: auto; }
.logo-d { display: none; }
:root[data-theme="dark"] .logo-l { display: none; }
:root[data-theme="dark"] .logo-d { display: block; }

/* Top bar = website navbar */
.topbar {
  min-height: 64px; padding: calc(10px + env(safe-area-inset-top, 0px)) var(--page-pad) 10px;
  background: rgb(255 255 255 / .85); border-bottom: 1px solid rgb(227 232 242 / .8);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
:root[data-theme="dark"] .topbar { background: rgb(5 11 31 / .85); border-bottom-color: var(--border); }
.brand { gap: 10px; min-width: 0; }
.brand img { border-radius: 0; box-shadow: none; }
.crm-tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-700);
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
}
.icon-btn { border-radius: 999px; background: var(--surface-solid); border-color: var(--line); box-shadow: var(--shadow); }
:root[data-theme="dark"] .icon-btn { border-color: var(--border); }
.icon-btn:hover { border-color: var(--brand-200); color: var(--brand-600); }
.icon-btn.small { border-radius: 999px; }
.card-menu .icon-btn, .icon-btn.tiny { box-shadow: none; }

/* Menu with icons */
.menu { border-radius: 16px; border-color: var(--line); }
:root[data-theme="dark"] .menu { border-color: var(--border); }
.menu button { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.menu button svg { width: 18px; height: 18px; color: var(--muted); }
.menu button:hover { background: var(--brand-50); color: var(--brand-700); }
.menu button:hover svg { color: var(--brand-600); }
.menu button.danger svg { color: var(--danger); }

/* Buttons = website buttons (pill, solid brand-600, glow) */
.btn { border-radius: 999px; font-weight: 600; }
.btn-sm { border-radius: 999px; }
.btn-primary { background: var(--brand-600); box-shadow: var(--glow); }
.btn-primary:hover { background: var(--brand-700); filter: none; }
:root[data-theme="dark"] .btn-primary:hover { background: #2f6bff; }
.btn-ghost { background: var(--surface-solid); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); }
.btn-ghost:hover { border-color: var(--brand-200); color: var(--brand-700); }
:root[data-theme="dark"] .btn-ghost { border-color: var(--border); }
.btn-danger { box-shadow: 0 10px 30px -10px rgb(239 68 68 / .6); }
.fab { border-radius: 999px; font-weight: 600; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
@media (max-width: 420px) { .fab { width: 58px; height: 58px; border-radius: 999px; } }
.install-card { background: linear-gradient(135deg, #2f6bff, #1843c4); box-shadow: var(--glow); }
.install-card .btn-primary { background: #fff; color: var(--brand-700); border: 0; }

/* Cards & tiles = website .card */
.card, .rem-card, .stat, .notify-card, .tabs, .search, .toolbar select {
  background: var(--surface-solid); border-color: var(--line);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
:root[data-theme="dark"] :is(.card, .rem-card, .stat, .notify-card, .tabs, .search, .toolbar select) { border-color: var(--border); }
.card, .rem-card, .stat, .notify-card { border-radius: 16px; }
@media (hover: hover) { .card:hover { border-color: var(--brand-200); } }
.card.is-new { border-color: rgb(255 122 26 / .45); }
.rem-card { border-left-width: 3px; }

/* Stats */
.stat { padding: 14px 16px; }
.stat-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.stat-value { font-size: 28px; }
@media (max-width: 420px) { .stat-value { font-size: 24px; } .stat-label { font-size: 10.5px; letter-spacing: .06em; } }

/* Tabs = pill switch */
.tabs { border-radius: 999px; }
.tab, .tab-pill { border-radius: 999px; }
.tab { font-weight: 600; }
.tab-pill { background: var(--brand-600); box-shadow: var(--glow); }

/* Search + inputs = website .field */
.search, .toolbar select { border-radius: 12px; }
.search:focus-within, .field input:focus, .field textarea:focus, .field select:focus {
  border-color: #2f6bff; box-shadow: 0 0 0 4px rgb(47 107 255 / .15);
}
.field input, .field textarea, .field select { background: var(--field-bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgb(10 22 51 / .05); }
:root[data-theme="dark"] :is(.field input, .field textarea, .field select) { border-color: var(--border); }
.field input::placeholder, .field textarea::placeholder, .search input::placeholder { color: #94a3b8; }
.field label { color: #0f2049; font-weight: 500; font-size: 14px; }
:root[data-theme="dark"] .field label { color: #c7d4f0; }
.composer { background: var(--field-bg); border: 1px solid var(--line); }
:root[data-theme="dark"] .composer { border-color: var(--border); }

/* Chips & status filter */
.chips button { background: var(--surface-solid); border: 1px solid var(--line); font-weight: 600; }
:root[data-theme="dark"] .chips button { border-color: var(--border); }
.chips button.on { background: var(--brand-600); box-shadow: var(--glow); }
.status-filter button svg, .st svg, .type-badge svg { width: 13px; height: 13px; stroke-width: 2.2; }
.st { gap: 5px; padding: 3px 10px; font-weight: 600; }
.type-badge { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.svc { background: var(--surface-solid); border-color: var(--line); }

/* Status picker */
.status-pick button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 52px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-solid); font-weight: 600; }
.status-pick button svg { width: 16px; height: 16px; }
.status-pick button.on { background: var(--brand-600); box-shadow: var(--glow); }
:root[data-theme="dark"] .status-pick button:not(.on) { border-color: var(--border); }

/* Section labels = website eyebrow */
.group-title { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; color: var(--brand-700); }
.group-title span { background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px;
  background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-700);
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.eyebrow i { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); }

/* Action buttons on cards */
.act { border-radius: 999px; border-color: var(--line); font-weight: 600; }
:root[data-theme="dark"] .act { border-color: var(--border); }
.act:hover { border-color: var(--brand-200); }
.card-actions.four .act { border-radius: 14px; }
.rem-chip { border-radius: 12px; }

/* Icon tiles (empty states, notify cards) = website service icon */
.empty-art, .notify-icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 14px;
  border-radius: 16px; background: var(--brand-50); color: var(--brand-600); box-shadow: inset 0 0 0 1px var(--brand-100);
  font-size: 0;
}
.empty-art svg { width: 26px; height: 26px; }
.notify-icon { width: 44px; height: 44px; margin: 0; border-radius: 12px; flex-shrink: 0; }
.notify-icon svg { width: 22px; height: 22px; }
.empty h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; }
.confirm-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto; border-radius: 999px; background: rgb(239 68 68 / .12); color: var(--danger); font-size: 0; }
.confirm-icon svg { width: 26px; height: 26px; }
.confirm h3 { font-family: var(--font-display); font-weight: 800; }

/* Form icons */
.seg span { gap: 8px; border: 1px solid var(--line); background: var(--surface-solid); font-weight: 600; border-radius: 12px; }
.seg span svg { width: 18px; height: 18px; }
.seg input:checked + span { border-color: #2f6bff; background: var(--brand-50); color: var(--brand-700); }
.kind-chips span { border-color: var(--line); font-weight: 600; }
.kind-chips span i { display: grid; place-items: center; }
.kind-chips span i svg { width: 18px; height: 18px; }
.kind-chips input:checked + span { background: var(--brand-600); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.link-btn svg { width: 16px; height: 16px; }

/* Timeline + small icons */
.tl-dot { color: var(--brand-600); background: var(--brand-50); }
.tl-dot svg { width: 17px; height: 17px; }
.tl-dot.k-call { color: #2f6bff; }
.tl-dot.k-meeting { color: #d97706; }
.tl-dot.k-whatsapp { color: #16a34a; }
.tl-dot.k-done { color: #059669; }
.tl-dot.k-added { color: #7c3aed; }
.ln-kind { display: grid; place-items: center; color: var(--muted); }
.ln-kind svg { width: 15px; height: 15px; }
.up-ic { display: grid; place-items: center; color: var(--brand-600); }
.up-ic svg { width: 18px; height: 18px; }
.sheet-head h2 { letter-spacing: -.02em; }
.sheet > :is(form, .sheet-body) { border: 1px solid var(--line); }
:root[data-theme="dark"] .sheet > :is(form, .sheet-body) { border-color: var(--border); }

/* Login = website card + eyebrow + headline */
.login-card { background: var(--surface-solid); border-color: var(--line); padding: 32px 24px 28px; }
:root[data-theme="dark"] .login-card { border-color: var(--border); }
.login-card img.login-logo { height: auto; width: 210px; margin: 0 auto 22px; border-radius: 0; box-shadow: none; }
.login-title { margin: 16px 0 6px; font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.login-sub { margin: 0 0 22px; color: var(--muted); font-size: 14.5px; }

/* Desktop polish */
@media (min-width: 700px) {
  .logo { height: 40px; }
  .topbar { min-height: 72px; }
}
@media (max-width: 360px) {
  .logo { height: 30px; }
  .crm-tag { display: none; }
}
.rem-note, .user-row, .rem-for { background: var(--soft-bg); }
.rem-for { background: var(--brand-50); }
@media (max-width: 380px) { .stat-label { white-space: normal; font-size: 10px; letter-spacing: .05em; line-height: 1.25; } }

/* Mobile polish (2026-11-13): dark borders + finger-sized tap areas */
:root[data-theme="dark"] { --line: rgba(255, 255, 255, 0.10); }
.info { gap: 0; }
.info-row { min-height: 32px; align-items: center; padding: 2px 0; }
.info-row svg { margin-top: 0; }
.last-note { min-height: 32px; padding: 2px 0; }
.up-main { min-height: 44px; }
.dh { align-items: flex-start; }
.dh .icon-btn { margin-top: 2px; }
.dh-info h3, .card-title h3 { overflow-wrap: anywhere; }
.dh-info h3 { line-height: 1.2; }
