:root {
  --navy: #111111;
  --navy-2: #1c1b19;
  --gold: #b08a4e;
  --gold-soft: #f1e7d6;
  --bg: #f4efe7;
  --surface: #ffffff;
  --border: #e3dccf;
  --text: #111111;
  --text-2: #5a5248;
  --muted: #8f8a80;
  --primary: #b08a4e;
  --primary-hover: #97743f;
  --accent: #00838e;
  --accent-dark: #00646e;
  --accent-soft: #e0f3f4;
  --danger: #c43c3c;
  --good: #0f7a3a;
  --good-bg: #e5f4ea;
  --lost-bg: #fbe9e9;
  --open-bg: #e0f3f4;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .06);
  --series-1: #00939f;
  --series-2: #c08a1e;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 14px; line-height: 1.45; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0; background: var(--navy); color: #d9d4c8; border-right: 1px solid rgba(212,165,60,.22);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
a.brand:hover { text-decoration: none; }
.brand-logo { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: block; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.auth-logo { width: 150px; height: 150px; border-radius: 50%; display: block; margin-bottom: 28px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.auth-logo-sm { display: none; width: 88px; height: 88px; border-radius: 50%; align-self: center; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--navy-2); display: grid; place-items: center; flex-shrink: 0; }
.brand-mark span { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--gold); }
.brand-name { font-weight: 700; color: #fff; font-size: 14px; line-height: 1.2; }
.brand-sub { font-size: 11px; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; }
.viewing { display: block; padding: 14px 16px 0; }
.viewing span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.viewing select { background: var(--navy-2); color: #fff; border-color: rgba(255,255,255,.15); }
.owner-tag { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--accent-dark); background: var(--accent-soft); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #c9c4b8; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav a.active { background: rgba(212,165,60,.14); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.side-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.side-foot .who { color: #fff; font-weight: 600; }
.side-foot .role { color: var(--muted); font-size: 12px; }
.side-foot .links { display: flex; gap: 14px; margin-top: 8px; }
.side-foot a, .side-foot button { color: #c9c4b8; background: none; border: 0; padding: 0; cursor: pointer; font-size: 13px; }
.side-foot a:hover, .side-foot button:hover { color: #fff; }

.main { flex: 1; min-width: 0; padding: 26px 32px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-2); margin-top: 2px; }
.crumb { color: var(--text-2); font-size: 13px; margin-bottom: 6px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 550; white-space: nowrap;
}
.btn:hover { background: #f1efea; text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #141414; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--lost-bg); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1d1606; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(0,131,142,.25); border-color: var(--accent); }
textarea { resize: vertical; min-height: 80px; }
label.field { display: block; }
label.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 6px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 320px; }
.toolbar select { width: auto; }

.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.segmented button { border: 0; background: none; padding: 7px 14px; cursor: pointer; font-weight: 550; color: var(--text-2); }
.segmented button + button { border-left: 1px solid var(--border); }
.segmented button.on { background: var(--navy); color: #fff; }

/* ---------- cards & tables ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); gap: 10px; }
.card-head .hint { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 10px 16px; border-bottom: 1px solid var(--border); background: #faf9f6; white-space: nowrap; }
td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: #f8f6f1; }
.opt-list { list-style: none; margin: 0; padding: 4px 0; }
.opt-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 20px; border-bottom: 1px solid var(--border); }
.opt-list li:last-child { border-bottom: 0; }
.opt-list .badge { flex-shrink: 0; margin-top: 1px; }
.opt-body { flex: 1; min-width: 0; font-size: 13.5px; }
.flabel { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.lc-note { text-transform: none; letter-spacing: 0; font-weight: 500; }
.s-muted { color: var(--muted); font-size: 12px; }
.phone { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.pill:hover { text-decoration: none; filter: brightness(.95); }
.pill.call { background: var(--accent-soft); color: var(--accent-dark); }
.pill.wa { background: #dcf5e4; color: #11713a; }
.badge.warn { background: #fdf0d2; color: #6d5212; }
.chip.urgent { background: #fbe1e1; color: #8f2424; }
.notice.danger { background: #fbe9e9; border-color: #f0c4c4; color: #7a1f1f; }
.notice.gold { background: var(--gold-soft); border-color: #ecd9a8; color: #5c4510; }
.nav-count { margin-left: auto; background: var(--gold); color: #141414; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 18px; }
/* unread notifications: a soft pulse so the badge catches the eye */
.nav-count.gold { box-shadow: 0 0 0 0 rgba(212, 165, 60, .6); animation: notif-pulse 2s ease-out infinite; }
@keyframes notif-pulse { 0% { box-shadow: 0 0 0 0 rgba(212, 165, 60, .6); } 70% { box-shadow: 0 0 0 8px rgba(212, 165, 60, 0); } 100% { box-shadow: 0 0 0 0 rgba(212, 165, 60, 0); } }
@media (prefers-reduced-motion: reduce) { .nav-count.gold { animation: none; } }
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; }
.notif.unread { background: var(--gold-soft); border-color: #ecd9a8; box-shadow: inset 4px 0 0 var(--gold); }
.notif-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #efede8; color: var(--text-2); }
.notif.unread .notif-icon { background: var(--gold); color: #141414; }
.notif-icon svg { width: 18px; height: 18px; }
.notif-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notif-body p { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; }
@media (max-width: 640px) { .notif { grid-template-columns: 36px minmax(0, 1fr); } .notif .btn-row { grid-column: 1 / -1; } }
.stepper button:disabled { cursor: default; }
.notice { border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 13.5px; border: 1px solid; }
.notice.warn { background: #fdf6e6; border-color: #ecd9a8; color: #5c4510; }
.notice.ok { background: var(--accent-soft); border-color: #b9dfe2; color: var(--accent-dark); }
.notice code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }
.next-step { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13.5px; }
.chip { display: inline-block; background: #efede8; color: var(--text-2); border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 600; margin: 2px 0; white-space: nowrap; }
.chip.warn { background: #fdf0d2; color: #6d5212; }
.missing { color: var(--danger); font-weight: 600; font-size: 13px; }
.req { font-size: 11px; color: var(--danger); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.hint-inline { color: var(--muted); font-size: 12.5px; }
.calc { padding: 8px 10px; background: var(--accent-soft); color: var(--accent-dark); border-radius: 8px; font-weight: 700; }
.calc-table { width: 100%; margin-top: 4px; background: #faf9f6; border-radius: 8px; }
.calc-table td { padding: 7px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.calc-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
/* Free-text boxes with suggestions (developer, payment plan, nationality): no drop-down arrow, so they read as
   boxes you type in; the suggestions still appear as you type */
input[list]::-webkit-calendar-picker-indicator { display: none !important; opacity: 0; }

/* website offers editor */
.offer-edit { margin-bottom: 18px; }
.offer-edit-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.offer-edit-head h2 { margin: 0; }
.offer-move { display: flex; gap: 6px; }
.offer-edit-head .hint-inline { margin-left: auto; }
.offer-edit-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.offer-edit-img { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.offer-img-frame { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #f1efe9; border: 1px dashed var(--border); display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.offer-img-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.offer-img-heavy { margin: 0; width: 100%; font-size: 13px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.offer-edit-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
@media (max-width: 860px) { .offer-edit-body { grid-template-columns: minmax(0, 1fr); } .offer-edit-head .hint-inline { margin-left: 0; width: 100%; } }
.radio { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.radio input { accent-color: var(--accent); }
.docs { display: flex; flex-direction: column; gap: 8px; }
.doc-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.doc-row label.btn { flex-shrink: 0; }
.doc-file { font-size: 13px; margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.doc-file span { color: var(--muted); font-size: 12px; }
th.chk, td.chk { width: 36px; padding-right: 0; cursor: default; }
th.chk input, td.chk input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--navy); color: #fff; padding: 8px 10px 8px 16px; border-radius: 10px; margin-bottom: 12px; }
.bulk-bar[hidden], [data-co][hidden] { display: none; }
.bulk-bar span { font-weight: 600; margin-right: auto; }
.bulk-bar .btn:not(.primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 40px 20px; text-align: center; color: var(--text-2); }
.empty h3 { color: var(--text); margin-bottom: 4px; font-size: 15px; }
.empty .btn { margin-top: 12px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #efede8; color: var(--text-2); white-space: nowrap; }
.badge.open { background: var(--open-bg); color: var(--accent-dark); }
.badge.won { background: var(--good-bg); color: var(--good); }
.badge.lost { background: var(--lost-bg); color: var(--danger); }
.badge.gold { background: var(--gold-soft); color: #7a5c17; }

.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold-soft); color: #7a5c17; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.co { border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); }
.name-cell { display: flex; align-items: center; gap: 10px; }
.name-cell .s { color: var(--muted); font-size: 12px; }

/* ---------- profile pages ---------- */
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.profile-top { display: flex; align-items: center; gap: 14px; }
dl.details { display: grid; grid-template-columns: 130px 1fr; gap: 10px 12px; margin: 0; }
dl.details dt { color: var(--text-2); font-size: 13px; }
dl.details dd { margin: 0; word-break: break-word; }
.notes { white-space: pre-wrap; color: var(--text); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-stats div { background: #f8f6f1; border-radius: 8px; padding: 10px 12px; }
.mini-stats b { display: block; font-size: 18px; }
.mini-stats span { font-size: 12px; color: var(--text-2); }

.stepper { display: flex; gap: 4px; margin: 4px 0 0; }
.stepper button {
  flex: 1; border: 0; padding: 10px 6px; font-size: 12.5px; font-weight: 600; cursor: pointer; background: #ecebe6; color: var(--text-2);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%);
}
.stepper button:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 6px 0 0 6px; }
.stepper button:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%); border-radius: 0 6px 6px 0; }
.stepper button.done { background: #c4e8ea; color: var(--accent-dark); }
.stepper button.current { background: var(--accent); color: #fff; }
.stepper button.won { background: var(--good); color: #fff; }
.stepper button:hover:not(.current) { filter: brightness(.96); }
.stepper.lost button { opacity: .55; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: 0; }
.t-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); flex-shrink: 0; font-size: 13px; }
.t-icon.system { background: var(--gold-soft); color: #7a5c17; }
.t-body { flex: 1; min-width: 0; }
.t-meta { font-size: 12px; color: var(--muted); }
.t-text { white-space: pre-wrap; word-break: break-word; }
.t-del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; align-self: flex-start; }
.t-del:hover { color: var(--danger); }
.add-activity { padding: 14px 20px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; align-items: start; }
.add-activity:has(select[name=dnc_reason]:not([hidden])) { grid-template-columns: 150px 150px 1fr auto; }
.add-activity [hidden], .act-hint[hidden] { display: none; }
.act-hint { padding: 8px 20px; border-bottom: 1px solid var(--border); font-size: 13px; }
.add-activity textarea { min-height: 40px; }

/* ---------- pipeline ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #ecebe6; border-radius: var(--radius); display: flex; flex-direction: column; min-height: 420px; }
.col.drag-over { background: #dff2f3; outline: 2px dashed var(--accent); outline-offset: -2px; }
.col-head { padding: 12px 12px 8px; }
.col-head .t { display: flex; justify-content: space-between; align-items: center; font-weight: 650; }
.col-head .count { background: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; color: var(--text-2); }
.col-head .v { font-size: 12px; color: var(--text-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.col-head .bar { height: 3px; border-radius: 2px; margin-top: 8px; }
.col-body { padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lead-card { background: #fff; border-radius: 8px; padding: 10px 12px; box-shadow: var(--shadow); cursor: grab; border: 1px solid transparent; }
.lead-card:hover { border-color: #b9dfe2; }
.lead-card.dragging { opacity: .5; }
.lead-card .lt { font-weight: 600; margin-bottom: 2px; }
.lead-card .lc { font-size: 12.5px; color: var(--text-2); }
.lead-card .lf { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12.5px; }
.lead-card .lf b { font-variant-numeric: tabular-nums; }
.lead-card .age { color: var(--muted); font-size: 12px; }
.col-empty { color: var(--muted); font-size: 12.5px; text-align: center; padding: 18px 6px; border: 1px dashed #c8cfd8; border-radius: 8px; }
.add-in-col { background: none; border: 0; color: var(--text-2); padding: 6px; cursor: pointer; border-radius: 6px; text-align: left; font-size: 13px; }
.add-in-col:hover { background: rgba(255,255,255,.6); color: var(--text); }

/* ---------- analytics ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; }
.kpi .l { font-size: 12.5px; color: var(--text-2); font-weight: 550; }
.kpi .v { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -.01em; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.accent { background: var(--navy); color: #fff; border-color: var(--navy); }
.kpi.accent .l { color: #b5b0a4; }
.kpi.accent .s { color: var(--gold); }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.charts .wide { grid-column: 1 / -1; }
.charts > .card { min-width: 0; }
.chart-box { position: relative; height: 270px; padding: 12px 16px 16px; min-width: 0; overflow: hidden; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.funnel { padding: 14px 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 150px 1fr 90px; gap: 12px; align-items: center; font-size: 13px; }
.funnel-track { background: #f0eee9; border-radius: 4px; height: 22px; overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 4px; min-width: 2px; }
.funnel-row .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.funnel-row .n b { color: var(--text); }
.list-rows { padding: 6px 0; }
.list-rows .r { display: flex; justify-content: space-between; gap: 10px; padding: 8px 20px; font-size: 13px; }
.list-rows .r + .r { border-top: 1px solid var(--border); }
.chart-empty { height: 100%; display: grid; place-items: center; color: var(--muted); text-align: center; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: radial-gradient(circle at 25% 45%, rgba(176,138,78,.22), transparent 55%), var(--navy); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 2px solid rgba(212,165,60,.35); box-shadow: 0 0 0 14px rgba(212,165,60,.06); }
.auth-art h2 { font-size: 30px; line-height: 1.2; max-width: 420px; font-weight: 700; }
.auth-art p { color: #b5b0a4; max-width: 420px; }
.auth-form { display: grid; place-items: center; padding: 32px 16px; }
.auth-form form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.auth-form h1 { margin-bottom: 2px; }
.auth-form .sub { color: var(--text-2); margin: 0 0 6px; }
.error { color: var(--danger); font-size: 13px; min-height: 18px; }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 32, .45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 640px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.modal.sm { max-width: 420px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-head button { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.2); font-size: 13.5px; }
.toast.err { background: var(--danger); }
.loading { padding: 60px; text-align: center; color: var(--muted); }

/* ---------- Assistant ---------- */
#toasts { bottom: 84px; }
.as-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; align-items: center; gap: 8px;
  background: var(--navy); color: #fff; border: 1px solid rgba(212,165,60,.5); border-radius: 999px; padding: 11px 18px 11px 14px;
  font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 10px 28px rgba(0,0,0,.28);
}
.as-fab:hover { border-color: var(--gold); }
.as-fab[hidden], .as-panel[hidden], .as-input[hidden], .as-mic[hidden] { display: none; }
.as-spark { color: var(--gold); font-size: 16px; }
.as-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 45; width: 400px; height: min(640px, calc(100vh - 40px));
  display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.3), 0 0 0 1px rgba(212,165,60,.3);
}
.as-head { display: flex; align-items: center; gap: 6px; padding: 14px 14px 12px 16px; background: var(--navy); color: #fff; }
.as-head div { flex: 1; display: grid; line-height: 1.3; }
.as-head b { font-size: 15px; }
.as-head b::before { content: "✦ "; color: var(--gold); }
.as-head span { font-size: 12px; color: #c9c4b8; }
.as-x { background: rgba(255,255,255,.08); border: 0; color: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; font: inherit; font-size: 13px; }
.as-x:last-child { font-size: 18px; line-height: 1; padding: 4px 10px 6px; }
.as-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.as-msg { align-self: flex-start; max-width: 88%; background: #fff; border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; padding: 9px 12px; font-size: 14px; line-height: 1.5; }
.as-msg.me { align-self: flex-end; background: var(--navy); color: #fff; border-color: var(--navy); border-radius: 14px 14px 4px 14px; }
.as-msg.err { background: var(--lost-bg); border-color: #f0c9c9; color: var(--danger); }
.as-msg code { font-size: 12px; }
.as-chips { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.as-chips button { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13px; color: var(--accent-dark); cursor: pointer; text-align: left; }
.as-chips button:hover { border-color: var(--accent); }
.as-card { background: #fff; border: 1px solid #ecd9a8; border-left: 4px solid var(--gold); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.as-card-h { font-weight: 600; margin-bottom: 6px; }
.as-card ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.as-card-b { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.as-card-s { margin-top: 8px; font-size: 12px; color: var(--muted); }
.as-card.results { border-color: var(--border); border-left-color: var(--accent); display: grid; gap: 6px; }
.as-card.results .ok { color: var(--good); }
.as-card.results .bad { color: var(--danger); }
.as-why { color: var(--text-2); font-size: 12.5px; margin: 2px 0 0 16px; }
.as-typing { display: flex; gap: 4px; padding: 12px 14px; }
.as-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: as-dot 1.2s infinite ease-in-out; }
.as-typing span:nth-child(2) { animation-delay: .15s; }
.as-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes as-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.as-input { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--border); background: #fff; }
.as-input textarea { flex: 1; resize: none; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 15px; max-height: 140px; }
.as-input textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,131,142,.14); }
.as-mic { border: 1px solid var(--border); background: #fff; border-radius: 10px; width: 40px; height: 40px; cursor: pointer; font-size: 18px; }
.as-mic.on { background: var(--lost-bg); border-color: var(--danger); }
@media (max-width: 640px) {
  .as-panel { inset: 0; width: auto; height: auto; border-radius: 0; }
  .as-fab { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { .as-typing span { animation: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .brand { padding: 14px 16px; }
  .viewing { padding: 10px 16px 0; }
  .nav { flex-direction: row; overflow-x: auto; padding: 8px; }
  .nav a { white-space: nowrap; }
  .nav a.active { box-shadow: inset 0 -3px 0 var(--gold); }
  .side-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; }
  .side-foot .links { margin: 0; }
  .main { padding: 18px 16px 48px; }
  .charts { grid-template-columns: minmax(0, 1fr); }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-logo-sm { display: block; }
  .brand-logo { width: 38px; height: 38px; }
  .form-grid { grid-template-columns: 1fr; }
  .add-activity, .add-activity:has(select[name=dnc_reason]:not([hidden])) { grid-template-columns: 1fr; }
  .funnel-row { grid-template-columns: 100px 1fr 70px; }
  dl.details { grid-template-columns: 110px 1fr; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi .v { font-size: 21px; }
  .mini-stats { grid-template-columns: 1fr; }
}

/* Dashboard: leads reassigned to you */
.assigned-list { display: flex; flex-direction: column; gap: 8px; }
.assigned-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }


/* Dashboard: activity & targets */
.perf-card { margin-bottom: 18px; }
.perf-head { flex-wrap: wrap; }
.perf-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.perf-controls label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); font-weight: 550; }
.perf-controls input { padding: 5px 8px; font-size: 13px; width: auto; }
.perf-block { padding: 14px 20px 4px; }
.perf-block h3, .perf-sub { margin: 0 0 10px; font-size: 13px; font-weight: 650; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.perf-sub { padding: 14px 20px 0; }
.perf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.perf-tile { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); }
.perf-tile .l { font-size: 12px; color: var(--text-2); font-weight: 550; }
.perf-tile .v { font-size: 24px; font-weight: 700; margin-top: 2px; letter-spacing: -.01em; }
.perf-tile .s { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.perf-bar { height: 6px; border-radius: 3px; background: #ece9e2; overflow: hidden; margin-top: 6px; }
.perf-bar.sm { height: 4px; margin-top: 4px; min-width: 56px; }
.perf-bar i { display: block; height: 100%; background: var(--muted); border-radius: 3px; }
.hit .perf-bar i { background: var(--good); }
.mid .perf-bar i { background: var(--gold); }
.low .perf-bar i { background: var(--danger); }
.perf-tile.hit { border-color: #b9dcc5; background: var(--good-bg); }
.perf-table th, .perf-table td { white-space: nowrap; }
.perf-cell .t { color: var(--muted); font-size: 12px; }
.perf-table tr.perf-total td { background: #faf9f6; border-top: 2px solid var(--border); }
.perf-foot { padding: 10px 20px 14px; }
.targets-grid { width: 100%; border-collapse: collapse; margin-top: 12px; }
.targets-grid th { text-align: left; font-size: 12px; color: var(--text-2); font-weight: 600; padding: 4px 6px; }
.targets-grid td { padding: 4px 6px; font-size: 13.5px; }
.targets-grid input { width: 100%; }
@media (max-width: 640px) { .perf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .perf-block { padding: 12px 14px 2px; } }

/* Activity & targets: one small card per team member */
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding: 0 20px 6px; }
.pm-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 12px 14px 8px; }
.pm-card.click { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.pm-card.click:hover, .pm-card.click:focus-visible { border-color: var(--primary); box-shadow: var(--shadow); outline: none; }
.pm-card.pm-total { background: #faf9f6; }
.pm-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: center; margin-bottom: 8px; }
.pm-head b { font-size: 14px; }
.pm-head .s { font-size: 11.5px; color: var(--muted); }
.pm-score { grid-column: 1 / -1; font-size: 11.5px; font-weight: 600; color: var(--text-2); background: var(--gold-soft); border-radius: 999px; padding: 2px 9px; justify-self: start; margin-top: 4px; }
.pm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; padding: 4px 0; border-top: 1px solid #f0eee8; font-size: 12.5px; }
.pm-row .pm-l { color: var(--text-2); }
.pm-row .pm-v .t { color: var(--muted); font-size: 11.5px; }
.pm-row .perf-bar.sm, .pm-row .pm-nobar { grid-column: 1 / -1; margin-top: 3px; }
.pm-row .pm-nobar { height: 4px; }
@media (max-width: 640px) { .pm-grid { grid-template-columns: minmax(0, 1fr); padding: 0 14px 6px; } }

/* Nested Living wordmark (sidebar, sign-in) */
.wordmark { font-family: "Outfit", "Helvetica Neue", Arial, sans-serif; font-weight: 900; letter-spacing: -.045em; line-height: 1; text-transform: none; white-space: nowrap; }
.wordmark i { display: inline-block; width: .2em; height: .2em; background: #b08a4e; margin-left: .05em; }
.brand-name.wordmark { font-size: 57px; color: #fff; margin-bottom: 4px; }
@media (max-width: 860px) { .brand-name.wordmark { font-size: 34px; } }
.auth-logo.wordmark { font-size: 112px; color: #fff; width: auto; height: auto; border-radius: 0; box-shadow: none; margin: 0 0 28px; text-align: left; }
@media (max-width: 1100px) { .auth-logo.wordmark { font-size: 84px; } }
.auth-logo-sm.wordmark { font-size: 36px; color: var(--text); width: auto; height: auto; border-radius: 0; box-shadow: none; }
