/* Meddera brand tokens (from packages/ui/tailwind-preset.js) */
:root {
  --brand: #2563eb;
  --brand-deep: #1d4ed8;
  --brand-soft: #e0eaff;
  --accent: #15b8a6;
  --accent-soft: #dffaf3;
  --ink: #1e3a5f;
  --ink-deep: #0d2340;
  --body-c: #64748B;
  --muted: #7a8ca8;
  --surface: #f8f9fb;
  --line: #E2E8F0;
  --success: #16A34A;
  --success-soft: #DCFCE7;
  --danger: #DC2626;
  --danger-soft: #FEE2E2;
  --warning: #F59E0B;
  --warning-deep: #D97706;
  --warning-soft: #FEF3C7;
  --grad: linear-gradient(135deg, #2563eb 0%, #15b8a6 100%);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 14.5px/1.5 'Montserrat', system-ui, sans-serif;
  background: var(--surface);
  color: var(--ink);
}
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--muted); }

.wordmark { font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.wordmark span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- login ---------- */
.login {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(21,184,166,.35), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(37,99,235,.4), transparent 60%),
    linear-gradient(150deg, var(--ink) 0%, var(--ink-deep) 100%);
}
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 34px 30px;
  width: 100%; max-width: 370px;
  box-shadow: 0 24px 60px rgba(13, 35, 64, .45);
  display: flex; flex-direction: column; gap: 14px;
}
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-icon { width: 44px; height: 44px; border-radius: 12px; }
.login-logo { font-size: 25px; }
.topbar-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.topbar-icon { width: 30px; height: 30px; border-radius: 8px; }
.login-sub { margin: -12px 0 8px; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--body-c); }
.login-card input {
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.login-card input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.login-error { color: var(--danger); font-size: 13px; margin: 0; font-weight: 500; }

/* ---------- buttons ---------- */
.btn-primary {
  background: var(--grad); color: #fff; border: none;
  padding: 11px 18px; border-radius: 12px; font-weight: 700; letter-spacing: -0.01em;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .3);
  transition: filter .15s, transform .1s, box-shadow .15s;
}
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 6px 18px rgba(37, 99, 235, .38); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost {
  background: #fff; color: var(--body-c);
  border: 1.5px solid var(--line); padding: 10px 16px; border-radius: 12px; font-weight: 600;
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--muted); color: var(--ink); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 18px; white-space: nowrap; }
@media (max-width: 760px) { .topbar-title { display: none; } }
.topbar-right { display: flex; gap: 8px; }

/* ---------- view tabs ---------- */
.view-tabs {
  display: flex; gap: 2px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 3px;
}
.view-tabs button {
  border: none; background: transparent; color: var(--body-c);
  padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: 13.5px;
  transition: background .15s, color .15s;
}
.view-tabs button.active { background: var(--ink); color: #fff; }

/* ---------- calendar ---------- */
.cal-wrap { max-width: 1100px; margin: 0 auto; padding: 30px 16px 60px; display: flex; flex-direction: column; gap: 12px; }
.cal-head { display: flex; align-items: center; gap: 8px; }
.cal-title { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; flex: 1; text-align: center; text-transform: capitalize; }
.cal-nav {
  width: 38px; height: 38px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  font-size: 20px; font-weight: 700; line-height: 1;
  transition: border-color .15s;
}
.cal-nav:hover { border-color: var(--muted); }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow span { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-day {
  position: relative;
  min-height: 58px; padding: 7px 6px 4px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-weight: 600; font-size: 13.5px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.cal-day:hover { border-color: var(--muted); }
.cal-day.other { color: var(--line); background: var(--surface); }
.cal-day.today {
  background: linear-gradient(135deg, rgba(37, 99, 235, .12) 0%, rgba(21, 184, 166, .14) 100%);
  border-color: rgba(37, 99, 235, .35);
}
.cal-day.today .cal-num { color: var(--brand-deep); font-weight: 800; }
.cal-day.sel { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cal-num { line-height: 1.4; }
.cal-dots { display: flex; gap: 3px; min-height: 6px; }
.cal-dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--brand); }
.cal-dots i.rem { background: var(--warning); }
.cal-day.other .cal-dots i { background: var(--muted); opacity: .5; }
.cal-more { font-size: 10px; font-weight: 700; color: var(--brand-deep); line-height: 1; }

.agenda { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.agenda h3 { margin: 0 0 10px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.agenda-empty { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.agenda-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 2px;
  border-top: 1px dashed var(--line);
}
.agenda-item:first-of-type { border-top: none; }
.agenda-time {
  flex: none; font-weight: 800; color: var(--brand-deep); font-size: 14px;
  background: var(--brand-soft); border-radius: 9px; padding: 4px 9px;
}
.agenda-date { flex: none; font-weight: 700; color: var(--body-c); font-size: 12.5px; padding-top: 6px; min-width: 88px; }
.agenda-info { flex: 1; min-width: 0; }
.agenda-name { font-weight: 700; font-size: 14.5px; letter-spacing: -0.01em; }
.agenda-name.linkable { cursor: pointer; }
.agenda-name.linkable:hover { color: var(--brand); }
.agenda-sub { color: var(--body-c); font-size: 12.5px; font-weight: 500; margin-top: 1px; display: flex; flex-wrap: wrap; gap: 3px 10px; }
.agenda-sub a { color: var(--brand); text-decoration: none; font-weight: 600; }
.agenda-note { color: var(--warning-deep); font-size: 12.5px; font-style: italic; margin-top: 2px; }
.agenda-del {
  flex: none; border: none; background: none; color: var(--muted);
  font-size: 16px; padding: 4px 6px; border-radius: 8px;
  transition: color .15s, background .15s;
}
.agenda-del:hover { color: var(--danger); background: var(--danger-soft); }
.up-row { cursor: pointer; }
.agenda-item.past { opacity: .55; }

/* meeting chip on contact cards */
.meet-chip { color: var(--brand-deep); font-weight: 700; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-meet {
  align-self: flex-start;
  border: 1.5px solid var(--brand); background: #fff; color: var(--brand);
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  transition: background .15s, color .15s;
}
.btn-meet:hover { background: var(--brand-soft); }

/* contact picker in meeting modal */
.m-contact { position: relative; display: block; }
.m-contact input { width: 100%; }
.m-results {
  position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(13, 35, 64, .16);
  padding: 5px; max-height: 220px; overflow-y: auto;
  display: flex; flex-direction: column;
}
.m-results button {
  border: none; background: none; text-align: left;
  padding: 8px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.m-results button span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.m-results button:hover { background: var(--surface); }
.m-selected {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--brand-soft); color: var(--brand-deep);
  border-radius: 10px; padding: 8px 6px 8px 12px; font-weight: 700; font-size: 13.5px;
  margin-top: -2px;
}
.m-selected button {
  border: none; background: none; color: var(--brand-deep);
  font-size: 17px; font-weight: 700; padding: 0 8px; line-height: 1;
}

/* ---------- filters ---------- */
.filters {
  padding: 30px 16px 0;
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px;
}
.filters input[type="search"], .cal-wrap input[type="search"] {
  width: 100%; padding: 12px 15px;
  border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.filters input[type="search"]:focus, .cal-wrap input[type="search"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.filter-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

/* ---------- custom dropdown ---------- */
.dd { position: relative; min-width: 0; }
.dd-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  font-weight: 600; font-size: 13.5px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
  text-align: left;
}
.dd-btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn .dd-placeholder { color: var(--body-c); font-weight: 500; }
.dd.filled .dd-btn { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }
.dd-btn:hover { border-color: var(--muted); }
.dd.open .dd-btn { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.dd-chevron { flex: none; transition: transform .18s ease; color: var(--muted); }
.dd.filled .dd-chevron { color: var(--brand-deep); }
.dd.open .dd-chevron { transform: rotate(180deg); }
.dd-menu {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0;
  min-width: 100%; max-height: 320px; overflow: hidden;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(13, 35, 64, .16);
  padding: 6px;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.dd.open .dd-menu { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.dd-search {
  flex: none; margin: 0 0 6px; padding: 8px 11px;
  border: 1.5px solid var(--line); border-radius: 9px; font-size: 13px; width: 100%;
}
.dd-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.dd-opts { overflow-y: auto; }
.dd-empty { padding: 10px 11px; font-size: 13px; color: var(--muted); font-weight: 500; }
.dd-opt {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px;
  background: none; border: none; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; color: var(--ink);
  text-align: left; white-space: nowrap;
}
.dd-opt:hover { background: var(--surface); }
.dd-opt.sel { background: var(--brand-soft); color: var(--brand-deep); font-weight: 700; }
.dd-opt .dd-check { flex: none; color: var(--brand); }
.dd-count { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: auto; }
.dd-opt.sel .dd-count { color: var(--brand-deep); }

/* ---------- status tabs ---------- */
.status-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.status-tabs button {
  border: 1.5px solid var(--line); background: #fff; color: var(--body-c);
  padding: 8px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
}
.status-tabs button b { font-weight: 800; margin-left: 3px; }
.status-tabs button:hover { border-color: var(--muted); }
.status-tabs button.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- list ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 12px 16px 60px; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; font-weight: 500; }
.list { display: flex; flex-direction: column; gap: 8px; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 13px 15px;
  border-left: 4px solid var(--muted);
  box-shadow: 0 1px 3px rgba(13, 35, 64, .04);
  transition: box-shadow .15s, border-color .15s;
}
.card:hover { box-shadow: 0 4px 14px rgba(13, 35, 64, .08); }
.card[data-status="planirano"] {
  border-color: rgba(245, 158, 11, .4);
  border-left-color: var(--warning);
  background: linear-gradient(135deg, rgba(245, 158, 11, .09) 0%, rgba(217, 119, 6, .05) 100%), #fff;
}
.card[data-status="prihvatili"] {
  border-color: rgba(22, 163, 74, .35);
  border-left-color: var(--success);
  background: linear-gradient(135deg, rgba(22, 163, 74, .07) 0%, rgba(21, 184, 166, .05) 100%), #fff;
}
.card[data-status="odbili"] {
  border-color: rgba(220, 38, 38, .3);
  border-left-color: var(--danger);
  background: linear-gradient(135deg, rgba(220, 38, 38, .07) 0%, rgba(220, 38, 38, .04) 100%), #fff;
}

.badge-ok, .badge-no {
  display: inline-block; vertical-align: 2px;
  margin-left: 8px; padding: 2.5px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
}
.badge-ok { background: var(--success); color: #fff; }
.badge-no { background: var(--danger-soft); color: var(--danger); }

.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; cursor: pointer; }
.card-name { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.card-loc { color: var(--muted); font-size: 13px; white-space: nowrap; font-weight: 500; }
.card-sub { color: var(--body-c); font-size: 13px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 10px; cursor: pointer; font-weight: 500; }
.card-sub .size { color: var(--brand-deep); font-weight: 700; }
.note-preview { color: var(--warning-deep); font-style: italic; }

.card-body { margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 11px; }
.contact-row { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; }
.contact-row a { color: var(--brand); text-decoration: none; font-weight: 600; }
.contact-row a:hover { text-decoration: underline; }
.contact-row .src { color: var(--muted); font-weight: 500; font-size: 12px; }

.status-row { display: flex; gap: 6px; flex-wrap: wrap; }
.status-row button {
  border: 1.5px solid var(--line); background: #fff; color: var(--body-c);
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  transition: background .15s, border-color .15s, color .15s;
}
.status-row button:hover { border-color: var(--muted); }
.status-row button.on[data-s="novo"] { background: var(--muted); border-color: var(--muted); color: #fff; }
.status-row button.on[data-s="planirano"] { background: var(--warning); border-color: var(--warning); color: #fff; }
.status-row button.on[data-s="prihvatili"] { background: var(--success); border-color: var(--success); color: #fff; }
.status-row button.on[data-s="odbili"] { background: var(--danger); border-color: var(--danger); color: #fff; }

.card-body textarea {
  width: 100%; min-height: 64px; resize: vertical;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px;
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.card-body textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: #fff; }
.note-hint { font-size: 11.5px; color: var(--muted); margin-top: -6px; font-weight: 500; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(13, 35, 64, .55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-card {
  background: #fff; border-radius: 20px; padding: 24px;
  width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
}
.modal-card h2 { margin: 0 0 4px; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.modal-card label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--body-c); }
.modal-card input {
  padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 11px; font-size: 14px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.modal-card input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ---------- map view ---------- */
.map-wrap { max-width: 1100px; margin: 0 auto; padding: 12px 16px 24px; }
.map-info { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--body-c); }
#map {
  height: calc(100vh - 260px); min-height: 420px;
  border-radius: 16px; border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(13, 35, 64, .06);
}
.leaflet-popup-content-wrapper { border-radius: 12px; font-family: 'Montserrat', system-ui, sans-serif; }
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; line-height: 1.5; }
.map-pop-name { font-weight: 800; font-size: 14px; letter-spacing: -0.01em; color: var(--ink); cursor: pointer; }
.map-pop-name:hover { color: var(--brand); }
.map-pop-sub { color: var(--body-c); font-weight: 500; }
.map-pop-links { margin-top: 6px; display: flex; gap: 10px; }
.map-pop-links a { color: var(--brand); font-weight: 700; text-decoration: none; }

/* ---------- activity log ---------- */
.act-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
.act-add { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.act-date {
  border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 10px;
  font-size: 12px; font-weight: 600; color: var(--body-c); background: #fff;
}
.act-note {
  flex: 1; min-width: 140px;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 12px;
  font-size: 12.5px; background: #fff;
}
.act-note:focus { outline: none; border-color: var(--brand); }
.act-list { display: flex; flex-direction: column; gap: 3px; }
.act-item { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; padding: 2px 0; }
.act-kind { font-weight: 700; color: var(--ink); white-space: nowrap; }
.act-note-txt { color: var(--body-c); font-weight: 500; }
.act-del { border: none; background: none; color: var(--muted); font-size: 12px; padding: 2px 6px; border-radius: 6px; margin-left: auto; }
.act-del:hover { color: var(--danger); background: var(--danger-soft); }
.rem-badge { background: var(--warning-soft); color: var(--warning-deep); }

/* ---------- pin / delete ---------- */
.map-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.map-top .map-info { margin: 0; }
.map-top-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pin-check {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px solid var(--line); background: #fff; color: var(--body-c);
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.pin-check:hover { border-color: var(--brand); }
.pin-check.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-deep); }
.pin-check input { accent-color: var(--brand); width: 15px; height: 15px; cursor: pointer; }
.pin-chip { font-size: 13px; }
.card-del {
  border: 1.5px solid var(--line); background: #fff; color: var(--danger);
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  margin-left: auto;
  transition: border-color .15s, background .15s;
}
.card-del:hover { background: var(--danger-soft); border-color: var(--danger); }

/* ---------- team view ---------- */
.team-list { display: flex; flex-direction: column; gap: 10px; }
.team-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; box-shadow: 0 1px 3px rgba(13, 35, 64, .04);
}
.team-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.team-name { font-weight: 800; font-size: 15.5px; letter-spacing: -0.02em; }
.team-role { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 9px; border-radius: 999px; margin-left: 8px; }
.team-role.admin { background: var(--ink); color: #fff; }
.team-role.agent { background: var(--brand-soft); color: var(--brand-deep); }
.team-actions { display: flex; gap: 6px; }
.team-del { border: 1.5px solid var(--line); background: #fff; color: var(--danger);
  padding: 6px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.team-del:hover { background: var(--danger-soft); border-color: var(--danger); }
.team-stats { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 12px; }
.stat {
  flex: 1; min-width: 78px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 6px;
}
.stat b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stat span { font-size: 11px; font-weight: 600; color: var(--muted); }
.stat.ok b { color: var(--success); }
.stat.no b { color: var(--danger); }
.stat.plan b { color: var(--warning-deep); }
.quota-line { margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--body-c);
  display: flex; flex-wrap: wrap; gap: 4px 12px; }
.quota-line .full { color: var(--danger); }
.agent-hint { font-size: 12.5px; color: var(--muted); margin: -2px 0 4px; font-weight: 500; }
.cred-box { background: var(--ink); color: #dff3ee; border-radius: 12px; padding: 14px 16px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-all; }

/* ---------- claims / multi-user ---------- */
.btn-claim {
  background: var(--grad); color: #fff; border: none;
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
  box-shadow: 0 3px 10px rgba(37, 99, 235, .25);
}
.btn-claim:hover { filter: brightness(1.07); }
.claim-chip {
  background: var(--brand-soft); color: var(--brand-deep);
  padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800;
}
.claim-chip.mine { background: var(--accent-soft); color: #0e7a6e; }
.mine-btn {
  border: 1.5px solid var(--line); background: #fff; color: var(--body-c);
  padding: 8px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
}
.mine-btn b { font-weight: 800; margin-left: 3px; }
.mine-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.inline-dd { width: auto; min-width: 160px; }
.inline-dd .dd-btn { padding: 8px 13px; font-size: 13px; border-radius: 999px; }

/* ---------- follow-up & contact tracking ---------- */
.tabs-row { display: flex; align-items: center; gap: 8px; }
.tabs-row .status-tabs { flex: 1; min-width: 0; }
.fu-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fu-label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.fu-btn {
  border: 1.5px solid var(--line); background: #fff; color: var(--body-c);
  padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
  transition: border-color .15s, color .15s;
}
.fu-btn:hover { border-color: var(--brand); color: var(--brand); }
.fu-btn.fu-clear { border-color: var(--warning); color: var(--warning-deep); background: var(--warning-soft); }
.fu-chip { color: var(--warning-deep); font-weight: 700; }
.fu-chip.overdue { color: var(--danger); }
.lc-chip { color: var(--muted); }
.overdue-txt { color: var(--danger) !important; }
.today-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.today-head h3 { margin: 0; }
a.btn-primary { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- pager ---------- */
.pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 16px;
}
.pager button {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  font-size: 19px; font-weight: 700; line-height: 1;
  transition: border-color .15s;
}
.pager button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager button:disabled { opacity: .35; cursor: default; }
.pg-info { font-size: 13px; font-weight: 600; color: var(--body-c); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; z-index: 60; box-shadow: 0 10px 28px rgba(13, 35, 64, .3);
}
.toast.err { background: var(--danger); }

@media (max-width: 640px) {
  .filter-row { grid-template-columns: 1fr 1fr; }
  .card-loc { white-space: normal; }
  .dd-menu { max-height: 240px; }
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .view-tabs { order: 3; width: 100%; }
  .view-tabs button { flex: 1; }
  .cal-day { min-height: 46px; padding: 5px 4px 3px; font-size: 12.5px; }
  .agenda-date { min-width: 70px; }
}
