/* ============================================================
   飞刚侠 CRM — design system
   ============================================================ */
:root {
  --bg: #f4f7fc;
  --bg-deep: #eef3fb;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --navy: #0b1736;
  --navy-2: #111f44;
  --text: #16213d;
  --text-2: #3e4b68;
  --muted: #74809b;
  --muted-2: #98a2b8;
  --line: #e7ecf5;
  --line-strong: #d8e0ee;
  --blue: #2f6bff;
  --blue-2: #4f86ff;
  --blue-soft: #edf2ff;
  --teal: #0ea5a4;
  --teal-soft: #e6fbf8;
  --violet: #8b5cf6;
  --violet-soft: #f3efff;
  --pink: #ec4899;
  --pink-soft: #fdf0f7;
  --green: #16a34a;
  --green-soft: #eaf8ef;
  --orange: #f59e0b;
  --orange-soft: #fff7e6;
  --red: #ef4444;
  --red-soft: #fff0f0;
  --shadow-xs: 0 1px 2px rgba(16, 30, 58, .04);
  --shadow-sm: 0 4px 14px rgba(24, 43, 84, .05);
  --shadow: 0 12px 36px rgba(24, 43, 84, .075);
  --shadow-lg: 0 26px 70px rgba(14, 29, 62, .18);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --sidebar: 236px;
  --topbar: 76px;
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Consolas", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 500px at 8% -8%, rgba(47, 107, 255, .065), transparent 62%),
    radial-gradient(900px 600px at 100% 0%, rgba(14, 165, 164, .05), transparent 60%),
    var(--bg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { display: block; }

::selection { background: rgba(47, 107, 255, .2); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cdd6e6; border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b2bfd6; background-clip: content-box; }

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }

.boot-splash {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
}
.boot-splash strong { display: block; font-size: 18px; color: var(--text); }
.boot-splash span { display: block; font-size: 13px; margin-top: 2px; }

/* ---------- brand ---------- */
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #5b8dff 0%, #2f6bff 45%, #22d3ee 120%);
  box-shadow: 0 8px 20px rgba(47, 107, 255, .34), inset 0 1px 0 rgba(255, 255, 255, .35);
  flex: none;
}
.brand-mark svg { width: 25px; height: 25px; }
.brand-mark--lg { width: 58px; height: 58px; border-radius: 18px; box-shadow: 0 16px 40px rgba(47, 107, 255, .4); }
.brand-mark--lg svg { width: 36px; height: 36px; }
.brand-mark--sm { width: 30px; height: 30px; border-radius: 9px; }
.brand-mark--sm svg { width: 19px; height: 19px; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: #fff;
  --btn-fg: var(--text-2);
  --btn-border: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--btn-border);
  border-radius: 11px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { border-color: #c4cfe3; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid rgba(47, 107, 255, .2); outline-offset: 2px; }
.btn--primary {
  --btn-bg: linear-gradient(135deg, #2f6bff, #4b83ff);
  --btn-fg: #fff;
  --btn-border: transparent;
  box-shadow: 0 9px 22px rgba(47, 107, 255, .26), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn--primary:hover { box-shadow: 0 12px 28px rgba(47, 107, 255, .34); }
.btn--dark { --btn-bg: var(--navy); --btn-fg: #fff; --btn-border: transparent; }
.btn--soft { --btn-bg: var(--blue-soft); --btn-fg: var(--blue); --btn-border: transparent; }
.btn--ghost { --btn-bg: transparent; --btn-border: transparent; --btn-fg: var(--text-2); }
.btn--ghost:hover { background: #f2f5fb; box-shadow: none; }
.btn--danger { --btn-bg: var(--red-soft); --btn-fg: var(--red); --btn-border: transparent; }
.btn--sm { min-height: 32px; padding: 0 11px; border-radius: 9px; font-size: 12.5px; gap: 6px; }
.btn--xs { min-height: 27px; padding: 0 9px; border-radius: 8px; font-size: 11.5px; gap: 5px; }
.btn--lg { min-height: 46px; padding: 0 22px; border-radius: 13px; font-size: 14.5px; }
.btn--block { width: 100%; }
.btn--icon { width: 40px; padding: 0; }
.btn[disabled] { opacity: .52; pointer-events: none; }

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--text-2);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.icon-btn:hover { background: #eef3fb; color: var(--blue); }
.icon-btn--surface { background: #fff; border-color: var(--line); box-shadow: var(--shadow-xs); }

/* ---------- forms ---------- */
.field { display: grid; gap: 7px; }
.field > label { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.field-note { font-size: 11.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.65; }
.input::placeholder, .textarea::placeholder { color: #a9b3c7; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3.5px rgba(47, 107, 255, .11);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2374809b' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 34px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.checkbox { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-box .icon { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.search-box .input { padding-left: 38px; }
.search-box--soft .input { background: #f4f7fc; border-color: transparent; }
.search-box--soft .input:focus { background: #fff; border-color: var(--blue); }

/* ---------- chips / badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f1f5fb;
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}
.badge--blue { background: var(--blue-soft); color: var(--blue); }
.badge--green { background: var(--green-soft); color: var(--green); }
.badge--orange { background: var(--orange-soft); color: #c27c07; }
.badge--violet { background: var(--violet-soft); color: #7448e8; }
.badge--pink { background: var(--pink-soft); color: #d63182; }
.badge--red { background: var(--red-soft); color: #dc3535; }
.badge--slate { background: #edf1f7; color: #67748d; }
.badge--dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge--outline { background: transparent; border: 1px solid var(--line-strong); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: .15s ease;
}
.pill:hover { border-color: #c8d3e7; color: var(--blue); }
.pill.is-active { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 6px 16px rgba(11, 23, 54, .16); }
.pill .count { font-size: 11px; opacity: .7; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; }

.avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.02em;
  flex: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.avatar--sm { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }
.avatar--lg { width: 58px; height: 58px; border-radius: 18px; font-size: 20px; }
.avatar--xl { width: 76px; height: 76px; border-radius: 22px; font-size: 26px; }
.avatar__status {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #b6c0d2;
}
.avatar__status.online { background: #22c55e; }
.avatar__status.away { background: #f59e0b; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid #fff; margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

.channel-badge {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: none;
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: -.03em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}
.channel-badge--sm { width: 23px; height: 23px; border-radius: 7px; font-size: 9px; }
.channel-badge--lg { width: 42px; height: 42px; border-radius: 13px; font-size: 14px; }
.channel-badge--whatsapp { background: linear-gradient(145deg, #35d36b, #16a34a); }
.channel-badge--linkedin { background: linear-gradient(145deg, #3b8bdd, #0a66c2); }
.channel-badge--instagram { background: linear-gradient(145deg, #f9ce34, #ee2a7b 55%, #6228d7); }
.channel-badge--facebook { background: linear-gradient(145deg, #4d94ff, #1877f2); }
.channel-badge--email { background: linear-gradient(145deg, #ffb75e, #f97316); }
.channel-badge--webhook { background: linear-gradient(145deg, #a78bfa, #7c3aed); }
.channel-badge--manual { background: linear-gradient(145deg, #94a3b8, #64748b); }
.channel-badge svg { width: 16px; height: 16px; }
.channel-badge--sm svg { width: 12px; height: 12px; }

.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); display: inline-block; }
.status-dot--green { background: #22c55e; }
.status-dot--orange { background: #f59e0b; }
.status-dot--red { background: #ef4444; }

/* ---------- shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 0 14px 16px;
  color: #b9c6e2;
  background:
    radial-gradient(400px 260px at 10% 100%, rgba(47, 107, 255, .22), transparent 70%),
    radial-gradient(320px 220px at 110% 16%, rgba(34, 211, 238, .1), transparent 70%),
    linear-gradient(180deg, #0b1736 0%, #0d1a3d 55%, #08132d 100%);
  box-shadow: 18px 0 50px rgba(11, 23, 54, .06);
  overflow: hidden;
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .05;
  background-image: linear-gradient(rgba(255, 255, 255, .8) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .8) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 65%);
}
.sidebar__brand {
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
  flex: none;
}
.sidebar__brand .brand-text { min-width: 0; }
.sidebar__brand strong {
  display: block;
  color: #fff;
  font-size: 16.5px;
  font-weight: 750;
  letter-spacing: -.03em;
  line-height: 1.2;
  white-space: nowrap;
}
.sidebar__brand span {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  letter-spacing: .13em;
  color: #7f91b7;
  font-weight: 650;
  white-space: nowrap;
}
.sidebar__nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding-top: 12px; }
.sidebar__nav::-webkit-scrollbar { width: 0; }
.nav-label {
  padding: 16px 12px 7px;
  color: #64769e;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 43px;
  margin: 2px 0;
  padding: 0 12px;
  border-radius: 11px;
  color: #a7b6d5;
  font-size: 13.5px;
  font-weight: 550;
  white-space: nowrap;
  transition: color .16s ease, background .16s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.is-active {
  color: #fff;
  background: linear-gradient(100deg, rgba(47, 107, 255, .96), rgba(69, 128, 255, .72));
  box-shadow: 0 9px 24px rgba(21, 73, 197, .3), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #7fb0ff;
}
.nav-item .icon { color: currentColor; opacity: .92; }
.nav-item__label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-badge {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  background: #ff5b6e;
  color: #fff;
  box-shadow: 0 2px 6px rgba(255, 91, 110, .35);
}
.nav-badge--soft { background: rgba(255, 255, 255, .14); box-shadow: none; color: #fff; }
.nav-item.is-active .nav-badge { background: rgba(255, 255, 255, .22); box-shadow: none; }

.sidebar__footer { flex: none; padding-top: 12px; }
.plan-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  padding: 13px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .035));
}
.plan-card::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: -34px;
  top: -40px;
  border-radius: 50%;
  background: rgba(34, 211, 238, .22);
  filter: blur(10px);
}
.plan-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-card strong { color: #fff; font-size: 12px; }
.plan-card .badge { background: rgba(34, 211, 238, .16); color: #7be4ef; font-size: 9.5px; min-height: 20px; }
.plan-card p { margin-top: 7px; color: #8496bb; font-size: 10.5px; }
.plan-bar { margin-top: 10px; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.plan-bar i { display: block; height: 100%; width: 72%; border-radius: inherit; background: linear-gradient(90deg, #4f86ff, #22d3ee); }

.main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar);
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar);
  flex: none;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 30px;
  background: rgba(247, 249, 253, .84);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid rgba(223, 230, 241, .8);
}
.topbar__title { min-width: 0; }
.topbar__title .eyebrow { font-size: 9.5px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.topbar__title h2 { font-size: 18px; font-weight: 750; letter-spacing: -.025em; white-space: nowrap; }
.topbar__search { position: relative; flex: 1; max-width: 440px; }
.topbar__search .input { height: 42px; background: #fff; box-shadow: var(--shadow-xs); }
.topbar__search kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fd;
  color: var(--muted);
  font: 10px var(--mono);
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 60;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow: auto;
}
.search-results__label { padding: 7px 10px 5px; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--muted-2); text-transform: uppercase; }
.search-result { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.search-result:hover { background: var(--surface-soft); }
.search-result__main { flex: 1; min-width: 0; }
.search-result__main strong { display: block; font-size: 13px; font-weight: 650; }
.search-result__main span { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { padding: 20px; text-align: center; font-size: 12.5px; color: var(--muted); }

.topbar__actions { display: flex; align-items: center; gap: 7px; margin-left: auto; flex: none; }
.topbar__divider { width: 1px; height: 26px; background: var(--line); margin: 0 5px; }
.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid #dcefe6;
  border-radius: 999px;
  background: #f4fcf8;
  color: #12855a;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}
.online-pill .status-dot { box-shadow: 0 0 0 4px rgba(34, 197, 94, .12); }
.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 5px 4px 4px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
}
.user-chip:hover { background: #eef3fb; }
.user-chip__meta { text-align: left; line-height: 1.25; }
.user-chip__meta strong { display: block; font-size: 12.5px; font-weight: 700; }
.user-chip__meta span { display: block; font-size: 10px; color: var(--muted); }

.mobile-nav { display: none; }
.mobile-menu-btn { display: none; }

.page {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 24px 30px 64px;
  animation: pageIn .32s ease both;
}
@keyframes pageIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.page-head__copy h1 { font-size: 25px; font-weight: 780; letter-spacing: -.035em; line-height: 1.2; }
.page-head__copy p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.page-head__actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.eyebrow { font-size: 10.5px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 244, .9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card--flat { box-shadow: none; }
.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 19px 21px 0;
}
.card__title { display: flex; align-items: center; gap: 9px; font-size: 15.5px; font-weight: 730; letter-spacing: -.02em; }
.card__title .icon { color: var(--blue); }
.card__sub { margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.card__body { padding: 18px 21px 21px; }
.card__foot { padding: 13px 21px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--blue); font-size: 11.5px; font-weight: 650; display: inline-flex; align-items: center; gap: 3px; }
.link-btn:hover { text-decoration: underline; }

/* ---------- dashboard ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
  gap: 28px;
  align-items: center;
  padding: 27px 30px;
  border-radius: 25px;
  color: #fff;
  background:
    radial-gradient(580px 300px at 82% 20%, rgba(34, 211, 238, .2), transparent 64%),
    radial-gradient(500px 340px at 6% 120%, rgba(79, 134, 255, .38), transparent 68%),
    linear-gradient(110deg, #0a1737 0%, #102a5d 52%, #1c4eae 100%);
  box-shadow: 0 24px 54px rgba(15, 36, 83, .18);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(90deg, transparent, #000 58%, #000);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -60px;
  top: -90px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .15);
  box-shadow: 0 0 0 34px rgba(255, 255, 255, .035), 0 0 0 70px rgba(255, 255, 255, .025);
  pointer-events: none;
}
.hero__copy { position: relative; z-index: 1; min-width: 0; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #cfe1ff;
  font-size: 10.5px;
  font-weight: 650;
  backdrop-filter: blur(8px);
}
.hero h1 { margin-top: 12px; font-size: clamp(27px, 2.4vw, 38px); font-weight: 780; letter-spacing: -.045em; line-height: 1.1; }
.hero h1 .wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.8s ease-in-out infinite; }
@keyframes wave { 0%, 55%, 100% { transform: rotate(0); } 62% { transform: rotate(16deg); } 70% { transform: rotate(-7deg); } 78% { transform: rotate(12deg); } 86% { transform: rotate(-2deg); } }
.hero p { margin-top: 8px; max-width: 560px; color: #afc3e9; font-size: 13px; line-height: 1.7; }
.hero p strong { color: #fff; font-weight: 700; }
.hero__actions { display: flex; align-items: center; gap: 9px; margin-top: 19px; flex-wrap: wrap; }
.hero__actions .btn { --btn-bg: rgba(255, 255, 255, .1); --btn-fg: #fff; --btn-border: rgba(255, 255, 255, .18); backdrop-filter: blur(8px); }
.hero__actions .btn--primary { --btn-bg: #fff; --btn-fg: #173a7a; --btn-border: transparent; box-shadow: 0 8px 20px rgba(0, 0, 0, .14); }
.hero__focus {
  position: relative;
  z-index: 1;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .045));
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.hero__focus-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; color: #c5d7f8; font-weight: 650; }
.hero__focus-head .badge { background: rgba(34, 211, 238, .14); color: #8eeaf5; }
.focus-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, .09); }
.focus-row:last-child { border-bottom: 0; padding-bottom: 0; }
.focus-row__icon { width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #a8c8ff; flex: none; }
.focus-row__main { flex: 1; min-width: 0; }
.focus-row__main strong { display: block; font-size: 12px; font-weight: 650; color: #f2f7ff; }
.focus-row__main span { display: block; font-size: 10.5px; color: #94acd6; margin-top: 1px; }
.focus-row__value { font-size: 13px; font-weight: 750; color: #fff; }
.focus-row__value small { display: block; font-size: 9px; color: #829bc9; font-weight: 600; text-align: right; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-top: 18px; }
.kpi {
  position: relative;
  overflow: hidden;
  padding: 17px 18px 15px;
  border: 1px solid rgba(226, 232, 244, .92);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi__label { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.kpi__icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; }
.kpi__icon--blue { background: var(--blue-soft); color: var(--blue); }
.kpi__icon--violet { background: var(--violet-soft); color: var(--violet); }
.kpi__icon--green { background: var(--green-soft); color: var(--green); }
.kpi__icon--orange { background: var(--orange-soft); color: #d48708; }
.kpi__value { margin-top: 7px; display: flex; align-items: baseline; gap: 5px; font-size: 28px; font-weight: 780; letter-spacing: -.04em; line-height: 1.1; }
.kpi__value small { font-size: 12px; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.kpi__foot { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 10.5px; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 10.5px; }
.delta--up { color: #16a34a; }
.delta--down { color: #e14b4b; }
.kpi__spark { position: absolute; right: 10px; bottom: 10px; width: 78px; height: 38px; opacity: .85; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(300px, .82fr); gap: 18px; margin-top: 18px; align-items: stretch; }
.dash-grid--three { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.15fr) minmax(260px, .75fr); }
.stack { display: grid; gap: 18px; align-content: start; min-width: 0; }

.chart-legend { display: flex; align-items: center; gap: 13px; font-size: 10.5px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.legend-dot--muted { background: #c7d4e8; }
.chart-summary { display: flex; align-items: flex-end; gap: 11px; margin-top: 12px; }
.chart-summary strong { font-size: 29px; font-weight: 780; letter-spacing: -.045em; line-height: 1; }
.chart-summary .delta { margin-bottom: 3px; }
.chart-wrap { position: relative; margin-top: 8px; height: 208px; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-tooltip { position: absolute; pointer-events: none; z-index: 2; padding: 6px 9px; border-radius: 8px; background: var(--navy); color: #fff; font-size: 10.5px; font-weight: 650; transform: translate(-50%, calc(-100% - 10px)); box-shadow: var(--shadow-sm); white-space: nowrap; opacity: 0; transition: opacity .12s ease; }
.chart-wrap:hover .chart-tooltip.is-on { opacity: 1; }

.target-card { display: flex; flex-direction: column; }
.target-main { display: flex; align-items: center; gap: 18px; padding: 18px 21px 2px; }
.ring {
  --p: 68;
  width: 122px;
  height: 122px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--blue) calc(var(--p) * 1%), #eaf0fa 0);
  position: relative;
  transition: .4s ease;
}
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; box-shadow: inset 0 1px 4px rgba(24, 43, 84, .06); }
.ring__inner { position: relative; z-index: 1; text-align: center; line-height: 1.1; }
.ring__inner strong { display: block; font-size: 24px; font-weight: 780; letter-spacing: -.04em; }
.ring__inner span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted); }
.target-copy { min-width: 0; }
.target-copy strong { display: block; font-size: 22px; font-weight: 780; letter-spacing: -.04em; }
.target-copy span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.target-copy .badge { margin-top: 9px; }
.target-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 15px 21px 0; }
.target-meta div { padding: 10px 12px; border-radius: 11px; background: var(--surface-soft); border: 1px solid var(--line); }
.target-meta span { display: block; font-size: 9.5px; color: var(--muted); }
.target-meta strong { display: block; margin-top: 2px; font-size: 14px; font-weight: 720; }
.mini-leader { padding: 15px 21px 19px; }
.mini-leader__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.mini-leader__row { display: flex; align-items: center; gap: 9px; padding: 7px 0; }
.mini-leader__row .avatar { width: 27px; height: 27px; border-radius: 8px; font-size: 10px; }
.mini-leader__name { flex: 1; min-width: 0; font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-leader__bar { width: 70px; height: 5px; border-radius: 99px; background: #edf1f8; overflow: hidden; }
.mini-leader__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4f86ff, #22d3ee); }
.mini-leader__value { width: 50px; text-align: right; font-size: 10.5px; font-weight: 700; }

/* calendar */
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calendar-nav { display: flex; align-items: center; gap: 6px; }
.calendar-range { font-size: 12px; font-weight: 700; }
.calendar-nav .icon-btn { width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 8px; }
.calendar { margin-top: 14px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.calendar-card { display: flex; flex-direction: column; }
.calendar-card .card__body { flex: 1; display: flex; flex-direction: column; }
.calendar-card .calendar { flex: 1; display: flex; flex-direction: column; }
.calendar-card .calendar__days { flex: 1; grid-auto-rows: 1fr; }
.calendar-card .calendar__day { min-height: 86px; height: 100%; }
.calendar__weekdays { display: grid; grid-template-columns: repeat(7, 1fr); background: #f8faff; border-bottom: 1px solid var(--line); }
.calendar__weekday { padding: 8px 6px; text-align: center; font-size: 10px; font-weight: 650; color: var(--muted); }
.calendar__days { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar__day { min-height: 103px; padding: 7px 7px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; min-width: 0; }
.calendar__day:nth-child(7n) { border-right: 0; }
.calendar__day:nth-last-child(-n+7) { border-bottom: 0; }
.calendar__day.is-today { background: linear-gradient(180deg, #f3f7ff, #fff); }
.calendar__date { display: flex; justify-content: center; }
.calendar__date span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 650;
  color: var(--text-2);
}
.calendar__day.is-today .calendar__date span { background: var(--blue); color: #fff; box-shadow: 0 3px 8px rgba(47, 107, 255, .3); }
.calendar__events { display: grid; gap: 3px; margin-top: 3px; }
.cal-event {
  display: block;
  width: 100%;
  border: 0;
  border-left: 2.5px solid var(--blue);
  border-radius: 3px;
  padding: 2.5px 4px;
  background: #edf3ff;
  color: #2858c9;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-event:hover { filter: brightness(.97); }
.cal-event--violet { border-color: var(--violet); background: #f4f0ff; color: #6b3fd4; }
.cal-event--green { border-color: var(--green); background: #ebf9f0; color: #127a3c; }
.cal-event--orange { border-color: var(--orange); background: #fff7e8; color: #a86a05; }
.cal-event--pink { border-color: var(--pink); background: #fdf0f7; color: #c72b77; }
.cal-event--more { border: 0; background: transparent; color: var(--muted); padding-left: 5px; }

/* tasks */
.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: #f1f5fb;
  overflow-x: auto;
}
.segmented button {
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.segmented button.is-active { background: #fff; color: var(--text); box-shadow: var(--shadow-xs); }
.segmented button .count { opacity: .55; font-size: 10px; margin-left: 2px; }
.task-tabs { margin-top: 14px; }
.task-list { margin-top: 9px; }
.task-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.task-row:last-child { border-bottom: 0; }
.task-check {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  border: 1.5px solid #c8d2e3;
  border-radius: 5px;
  background: #fff;
  flex: none;
  display: grid;
  place-items: center;
  color: transparent;
  transition: .14s ease;
}
.task-check:hover { border-color: var(--blue); color: var(--blue); }
.task-check.is-done { background: var(--green); border-color: var(--green); color: #fff; }
.task-row.is-done .task-title { color: var(--muted); text-decoration: line-through; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-size: 12px; font-weight: 620; line-height: 1.45; }
.task-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 10px; color: var(--muted); flex-wrap: wrap; }
.task-meta .priority { display: inline-flex; align-items: center; gap: 3px; }
.task-meta .priority::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #b9c3d5; }
.task-meta .priority--high::before { background: #ef4444; }
.task-meta .priority--medium::before { background: #f59e0b; }
.task-meta .priority--low::before { background: #94a3b8; }
.task-due { font-size: 9.5px; color: #c07a09; background: var(--orange-soft); padding: 1px 6px; border-radius: 99px; font-weight: 650; white-space: nowrap; }
.task-action { border: 0; background: transparent; color: var(--blue); font-size: 10.5px; font-weight: 650; padding: 3px 0; white-space: nowrap; }
.task-add { width: 100%; margin-top: 7px; border: 1px dashed var(--line-strong); border-radius: 9px; min-height: 32px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 5px; }
.task-add:hover { color: var(--blue); border-color: #b9c9e8; background: #f9fbff; }

.insight-box {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  background: linear-gradient(135deg, #f2f6ff, #f7fbff);
  border: 1px solid #e2ebff;
}
.insight-box__head { display: flex; align-items: center; gap: 6px; color: var(--blue); font-size: 10px; font-weight: 750; letter-spacing: .04em; }
.insight-box p { margin-top: 5px; font-size: 10.5px; line-height: 1.6; color: var(--text-2); }

/* channel health */
.channel-list { display: grid; gap: 1px; }
.channel-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.channel-row:last-child { border-bottom: 0; }
.channel-row__main { flex: 1; min-width: 0; }
.channel-row__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.channel-row__name { font-size: 11.5px; font-weight: 650; }
.channel-row__status { font-size: 9.5px; color: var(--muted); }
.channel-row__status.is-ok { color: #118b57; }
.channel-health { margin-top: 5px; height: 4px; border-radius: 99px; background: #edf1f8; overflow: hidden; }
.channel-health i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #42d392, #16a34a); }
.channel-row__value { font-size: 10px; font-weight: 700; color: var(--text-2); width: 32px; text-align: right; }

/* activity */
.activity-list { display: grid; }
.activity-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--blue-soft); color: var(--blue); }
.activity-icon--message { background: var(--teal-soft); color: var(--teal); }
.activity-icon--deal { background: var(--green-soft); color: var(--green); }
.activity-icon--campaign { background: var(--violet-soft); color: var(--violet); }
.activity-icon--customer { background: var(--orange-soft); color: #c98208; }
.activity-icon--team { background: var(--pink-soft); color: var(--pink); }
.activity-icon .icon { width: 14px; height: 14px; }
.activity-main { flex: 1; min-width: 0; }
.activity-main p { font-size: 11.5px; line-height: 1.5; color: var(--text-2); }
.activity-main p strong { font-weight: 700; color: var(--text); }
.activity-time { font-size: 9.5px; color: var(--muted-2); white-space: nowrap; padding-top: 2px; }

.deal-mini { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.deal-mini:last-child { border-bottom: 0; }
.deal-mini__main { flex: 1; min-width: 0; }
.deal-mini__main strong { display: block; font-size: 11.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-mini__main span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.deal-mini__value { text-align: right; font-size: 11.5px; font-weight: 720; white-space: nowrap; }
.deal-mini__value span { display: block; font-size: 9px; color: var(--muted); font-weight: 500; }
.prob { height: 4px; margin-top: 5px; border-radius: 99px; background: #edf1f8; overflow: hidden; }
.prob i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4f86ff, #22d3ee); }

/* ---------- tables / customers ---------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 244, .95);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.toolbar .search-box { flex: 1; min-width: 220px; max-width: 340px; }
.toolbar__spacer { flex: 1; }
.toolbar .select { width: auto; min-width: 120px; height: 38px; min-height: 38px; font-size: 12.5px; }
.group-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin: 15px 0; }
.group-tabs .pill .count { background: rgba(0, 0, 0, .05); border-radius: 99px; padding: 0 5px; }
.group-tabs .pill.is-active .count { background: rgba(255, 255, 255, .16); }

.table-card { margin-top: 15px; overflow: hidden; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 980px; }
.data-table th {
  height: 43px;
  padding: 0 14px;
  background: #f8faff;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--muted);
  white-space: nowrap;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid #eff3f9; vertical-align: middle; }
.data-table tbody tr { transition: background .12s ease; cursor: pointer; }
.data-table tbody tr:hover { background: #f9fbff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .col-check { width: 42px; padding-right: 0; }
.data-table .col-actions { width: 42px; text-align: right; }
.cell-person { display: flex; align-items: center; gap: 10px; min-width: 168px; }
.cell-person__main { min-width: 0; }
.cell-person__main strong { display: block; font-size: 12.5px; font-weight: 680; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-person__main span { display: block; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.cell-company strong { display: block; font-size: 11.5px; font-weight: 620; }
.cell-company span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.cell-value { font-size: 12px; font-weight: 720; white-space: nowrap; }
.cell-value span { display: block; font-size: 9px; color: var(--muted); font-weight: 500; }
.cell-muted { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.cell-channel { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.group-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; color: var(--text-2); }
.group-tag i { width: 6px; height: 6px; border-radius: 50%; }
.owner-mini { display: flex; align-items: center; gap: 6px; }
.owner-mini span { font-size: 10.5px; color: var(--text-2); white-space: nowrap; }
.row-actions { opacity: 0; transition: opacity .12s ease; }
.data-table tr:hover .row-actions { opacity: 1; }

.customer-mobile-list { display: none; padding: 0 14px 14px; }
.customer-mobile-card { padding: 13px 2px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.customer-mobile-card:last-child { border-bottom: 0; }
.customer-mobile-card__main { flex: 1; min-width: 0; }
.customer-mobile-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.customer-mobile-card__top strong { font-size: 13px; }
.customer-mobile-card__meta { margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.customer-mobile-card__bottom { display: flex; align-items: center; gap: 7px; margin-top: 7px; flex-wrap: wrap; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 17px; border-top: 1px solid var(--line); }
.pagination__info { font-size: 10.5px; color: var(--muted); }
.pagination__controls { display: flex; gap: 4px; }
.page-btn { width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text-2); font-size: 11px; font-weight: 650; display: grid; place-items: center; }
.page-btn:hover { border-color: #b9c9e8; }
.page-btn.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

.bulk-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 45;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 15px;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 18px 50px rgba(11, 23, 54, .32);
}
.bulk-bar span { font-size: 11.5px; white-space: nowrap; }
.bulk-bar .select { height: 32px; min-height: 32px; border: 1px solid rgba(255, 255, 255, .18); background-color: rgba(255, 255, 255, .1); color: #fff; font-size: 11px; }
.bulk-bar .select option { color: var(--text); }
.bulk-bar .btn { --btn-bg: rgba(255, 255, 255, .12); --btn-fg: #fff; --btn-border: transparent; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-strip__item { padding: 13px 15px; border: 1px solid rgba(226, 232, 244, .9); border-radius: 14px; background: #fff; box-shadow: var(--shadow-xs); }
.stat-strip__item span { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); font-weight: 600; }
.stat-strip__item strong { display: block; margin-top: 3px; font-size: 20px; font-weight: 760; letter-spacing: -.04em; }
.stat-strip__item strong small { font-size: 10px; color: var(--muted); font-weight: 500; }

/* ---------- pipeline ---------- */
.pipeline-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.pipeline-stat { display: flex; align-items: center; gap: 11px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pipeline-stat__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.pipeline-stat__copy span { display: block; font-size: 9.5px; color: var(--muted); }
.pipeline-stat__copy strong { display: block; font-size: 16px; font-weight: 750; letter-spacing: -.02em; }
.pipeline-board { display: flex; gap: 13px; overflow-x: auto; align-items: flex-start; padding: 1px 1px 13px; }
.pipeline-col {
  width: 286px;
  flex: none;
  border-radius: 16px;
  padding: 11px;
  background: #eef3fb;
  border: 1px solid #e4eaf5;
  transition: background .15s ease, border-color .15s ease;
}
.pipeline-col.is-over { background: #e5eeff; border-color: #9dbbff; }
.pipeline-col__head { display: flex; align-items: center; gap: 7px; padding: 2px 3px 9px; }
.stage-dot { width: 7px; height: 7px; border-radius: 50%; }
.pipeline-col__name { font-size: 11.5px; font-weight: 720; }
.pipeline-col__count { min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 99px; background: #fff; color: var(--muted); font-size: 9.5px; font-weight: 700; }
.pipeline-col__sum { margin-left: auto; font-size: 9.5px; color: var(--muted); font-weight: 650; }
.pipeline-col__add { width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.pipeline-col__add:hover { background: #fff; color: var(--blue); }
.pipeline-cards { display: grid; gap: 8px; min-height: 50px; }
.deal-card {
  position: relative;
  padding: 11px;
  border: 1px solid #e4eaf4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(24, 43, 84, .04);
  cursor: grab;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.deal-card:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(24, 43, 84, .09); border-color: #d2ddee; }
.deal-card.is-dragging { opacity: .45; transform: rotate(1.5deg); }
.deal-card__top { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.deal-card__value { font-size: 14px; font-weight: 760; letter-spacing: -.03em; }
.deal-card__title { margin-top: 7px; font-size: 11.5px; font-weight: 650; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deal-card__customer { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 9.5px; color: var(--muted); }
.deal-card__customer .avatar { width: 19px; height: 19px; border-radius: 6px; font-size: 8px; }
.deal-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 9px; padding-top: 8px; border-top: 1px solid #f0f3f9; }
.deal-card__prob { flex: 1; }
.deal-card__prob span { display: flex; justify-content: space-between; font-size: 8.5px; color: var(--muted); margin-bottom: 3px; }
.deal-card__prob .prob { margin-top: 0; }
.deal-card__date { font-size: 8.5px; color: var(--muted-2); white-space: nowrap; }
.deal-card__won { position: absolute; top: 8px; right: 8px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; }
.deal-card__won .icon { width: 10px; height: 10px; }
.pipeline-empty { border: 1px dashed #d5ddeb; border-radius: 10px; min-height: 48px; display: grid; place-items: center; color: var(--muted-2); font-size: 9.5px; }

/* ---------- inbox ---------- */
.inbox-shell {
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr) 294px;
  height: calc(100vh - 196px);
  min-height: 590px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.inbox-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.inbox-list { border-right: 1px solid var(--line); background: #fff; }
.inbox-list__head { padding: 14px; border-bottom: 1px solid var(--line); }
.inbox-list__filters { display: flex; gap: 5px; margin-top: 10px; }
.inbox-list__filters button { border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); padding: 4px 9px; font-size: 10px; font-weight: 600; }
.inbox-list__filters button.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.conversation-scroll { flex: 1; overflow-y: auto; padding: 5px; }
.conversation-item { display: flex; gap: 9px; padding: 10px; border-radius: 11px; cursor: pointer; transition: background .12s ease; }
.conversation-item:hover { background: #f7f9fd; }
.conversation-item.is-active { background: linear-gradient(100deg, #eef3ff, #f6f9ff); box-shadow: inset 2px 0 0 var(--blue); }
.conversation-item__main { flex: 1; min-width: 0; }
.conversation-item__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.conversation-item__name { font-size: 11.5px; font-weight: 680; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-item__time { font-size: 8.5px; color: var(--muted-2); white-space: nowrap; }
.conversation-item__bottom { display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.conversation-item__snippet { flex: 1; min-width: 0; font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unread-dot { min-width: 15px; height: 15px; padding: 0 4px; border-radius: 99px; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 8px; font-weight: 700; }
.conversation-item__channel { position: absolute; }
.conv-avatar { position: relative; }
.conv-avatar .channel-badge { position: absolute; right: -4px; bottom: -4px; border: 2px solid #fff; width: 18px; height: 18px; border-radius: 6px; }
.conv-avatar .channel-badge svg { width: 9px; height: 9px; }

.thread { background: #f7f9fd; min-height: 0; }
.thread__head { height: 65px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); background: #fff; }
.thread__head-main { flex: 1; min-width: 0; }
.thread__head-main strong { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; }
.thread__head-main span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread__messages { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.thread-date { align-self: center; padding: 3px 9px; border-radius: 99px; background: #e9eef8; color: var(--muted); font-size: 8.5px; font-weight: 600; }
.msg { display: flex; gap: 7px; max-width: 78%; }
.msg--out { align-self: flex-end; flex-direction: row-reverse; }
.msg__bubble { padding: 9px 12px; border-radius: 13px 13px 13px 4px; background: #fff; border: 1px solid #e6ecf6; color: var(--text-2); font-size: 11.5px; line-height: 1.6; box-shadow: 0 2px 5px rgba(24, 43, 84, .03); }
.msg--out .msg__bubble { border: 0; border-radius: 13px 13px 4px 13px; background: linear-gradient(135deg, #2f6bff, #4b83ff); color: #fff; box-shadow: 0 6px 14px rgba(47, 107, 255, .18); }
.msg__meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 3px; font-size: 8px; color: var(--muted-2); }
.msg--out .msg__meta { color: rgba(255, 255, 255, .65); }
.msg__meta .icon { width: 10px; height: 10px; }
.thread__composer { flex: none; padding: 12px 15px; border-top: 1px solid var(--line); background: #fff; }
.composer-box { border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
.composer-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 107, 255, .09); }
.composer-box textarea { width: 100%; min-height: 54px; max-height: 120px; padding: 9px 11px 0; border: 0; resize: none; outline: none; font-size: 11.5px; line-height: 1.55; }
.composer-actions { display: flex; align-items: center; gap: 5px; padding: 5px 7px 7px 9px; }
.composer-actions .btn { margin-left: auto; }
.quick-replies { display: flex; gap: 5px; padding: 0 15px 9px; overflow-x: auto; background: #fff; }
.quick-reply { border: 1px solid var(--line); border-radius: 99px; background: #f8faff; color: var(--muted); padding: 4px 9px; font-size: 9px; white-space: nowrap; }
.quick-reply:hover { color: var(--blue); border-color: #bdd0f8; }
.thread-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); text-align: center; padding: 30px; }
.thread-empty__icon { width: 58px; height: 58px; border-radius: 18px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--blue); box-shadow: var(--shadow-sm); }
.thread-empty strong { font-size: 13px; color: var(--text); }
.thread-empty p { font-size: 10.5px; max-width: 240px; }

.contact-panel { border-left: 1px solid var(--line); background: #fff; overflow-y: auto; }
.contact-panel__head { padding: 20px 16px 14px; text-align: center; border-bottom: 1px solid var(--line); }
.contact-panel__head .avatar { margin: 0 auto; }
.contact-panel__head strong { display: block; margin-top: 9px; font-size: 13px; }
.contact-panel__head span { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }
.contact-panel__head .badge { margin-top: 8px; }
.contact-block { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.contact-block__title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; font-size: 9px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.contact-line { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-size: 10.5px; color: var(--text-2); }
.contact-line .icon { width: 13px; height: 13px; color: var(--muted); }
.contact-line a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-note { font-size: 10.5px; color: var(--text-2); line-height: 1.65; }
.contact-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.contact-deal { display: flex; align-items: center; gap: 7px; padding: 7px 0; }
.contact-deal .icon { color: var(--green); }
.contact-deal div { flex: 1; min-width: 0; }
.contact-deal strong { display: block; font-size: 10.5px; font-weight: 650; }
.contact-deal span { display: block; font-size: 9px; color: var(--muted); }

/* ---------- marketing ---------- */
.marketing-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.marketing-stat { padding: 15px 17px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.marketing-stat span { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
.marketing-stat strong { display: block; margin-top: 4px; font-size: 22px; font-weight: 770; letter-spacing: -.04em; }
.marketing-stat small { display: block; margin-top: 2px; font-size: 9.5px; color: var(--green); font-weight: 600; }
.tab-bar { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin: 18px 0; overflow-x: auto; }
.tab-bar button { position: relative; border: 0; background: transparent; padding: 0 1px 11px; color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
.tab-bar button.is-active { color: var(--text); }
.tab-bar button.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--blue); }
.tab-bar .count { margin-left: 4px; font-size: 9.5px; color: var(--muted); }
.campaign-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.campaign-card { overflow: hidden; padding: 17px; transition: transform .16s ease, box-shadow .16s ease; }
.campaign-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.campaign-card__top { display: flex; align-items: flex-start; gap: 11px; }
.campaign-card__main { flex: 1; min-width: 0; }
.campaign-card__main h3 { font-size: 13.5px; font-weight: 700; letter-spacing: -.02em; }
.campaign-card__main p { margin-top: 4px; font-size: 10px; color: var(--muted); }
.campaign-card__status { display: flex; align-items: center; gap: 7px; }
.campaign-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 14px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.campaign-metric span { display: block; font-size: 8.5px; color: var(--muted); }
.campaign-metric strong { display: block; margin-top: 1px; font-size: 13px; font-weight: 730; }
.campaign-card__content { margin-top: 10px; padding: 9px 11px; border-radius: 9px; background: #f8faff; border: 1px solid #eef2f9; font-size: 10px; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.campaign-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; }
.campaign-card__audience { display: flex; align-items: center; gap: 6px; font-size: 9.5px; color: var(--muted); }
.campaign-card__actions { display: flex; gap: 5px; }

.automation-list { display: grid; gap: 10px; }
.automation-row { display: flex; align-items: center; gap: 13px; padding: 15px 17px; }
.automation-icon { width: 39px; height: 39px; border-radius: 12px; background: var(--violet-soft); color: var(--violet); display: grid; place-items: center; flex: none; }
.automation-main { flex: 1; min-width: 0; }
.automation-main strong { display: block; font-size: 12px; font-weight: 680; }
.automation-main p { margin-top: 2px; font-size: 10px; color: var(--muted); }
.automation-meta { display: flex; align-items: center; gap: 12px; margin-top: 5px; font-size: 9.5px; color: var(--muted); flex-wrap: wrap; }
.automation-meta span { display: inline-flex; align-items: center; gap: 4px; }
.toggle { position: relative; width: 35px; height: 20px; border-radius: 99px; border: 0; background: #dbe3f0; transition: background .18s ease; flex: none; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(24, 43, 84, .18); transition: transform .18s ease; }
.toggle.is-on { background: var(--blue); }
.toggle.is-on::after { transform: translateX(15px); }
.template-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.template-card { padding: 16px; }
.template-card__top { display: flex; align-items: center; gap: 9px; }
.template-card__top strong { flex: 1; font-size: 12.5px; }
.template-card p { margin-top: 9px; font-size: 10.5px; color: var(--muted); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; min-height: 66px; }
.template-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }

/* ---------- team ---------- */
.team-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 20px 22px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(105deg, #122654, #1e4796);
  margin-bottom: 16px;
}
.team-banner::after { content: ""; position: absolute; width: 180px; height: 180px; right: 5%; top: -70px; border-radius: 50%; background: rgba(34, 211, 238, .15); filter: blur(6px); }
.team-banner__main { flex: 1; min-width: 0; position: relative; z-index: 1; }
.team-banner h2 { font-size: 18px; font-weight: 750; letter-spacing: -.03em; }
.team-banner p { margin-top: 3px; font-size: 11.5px; color: #abc0e5; }
.seat-meter { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.seat-meter__bar { width: 180px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.seat-meter__bar i { display: block; height: 100%; width: 62%; border-radius: inherit; background: linear-gradient(90deg, #4f86ff, #22d3ee); }
.seat-meter span { font-size: 9.5px; color: #a9bfe5; }
.team-banner__avatars { display: flex; align-items: center; position: relative; z-index: 1; }
.team-banner__avatars .avatar { border: 2px solid #1a3670; margin-left: -10px; }
.team-banner__avatars .avatar:first-child { margin-left: 0; }

.team-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 16px; margin-top: 16px; }
.leader-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.leader-rank { width: 20px; font-size: 10px; font-weight: 750; color: var(--muted-2); text-align: center; }
.leader-rank.is-top { color: #f59e0b; }
.leader-main { flex: 1; min-width: 0; }
.leader-top { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }
.leader-top strong { font-weight: 650; }
.leader-top span { color: var(--muted); font-size: 10px; }
.leader-bar { margin-top: 4px; height: 6px; border-radius: 99px; background: #eef2f9; overflow: hidden; }
.leader-bar i { display: block; height: 100%; border-radius: inherit; }
.workload-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; height: 140px; padding-top: 14px; }
.workload-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.workload-col__bar { width: 25px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #4f86ff, #dbe7ff); min-height: 4px; transition: .3s ease; }
.workload-col__bar.is-hot { background: linear-gradient(180deg, #f59e0b, #fde9bd); }
.workload-col__bar.is-over { background: linear-gradient(180deg, #ef4444, #fbd0d0); }
.workload-col strong { font-size: 9px; font-weight: 700; }
.workload-col span { font-size: 8.5px; color: var(--muted); text-align: center; line-height: 1.2; }

.member-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.member-card { padding: 17px; transition: transform .16s ease, box-shadow .16s ease; }
.member-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.member-card__head { display: flex; align-items: center; gap: 10px; }
.member-card__head .avatar { width: 44px; height: 44px; border-radius: 14px; font-size: 15px; }
.member-card__identity { flex: 1; min-width: 0; }
.member-card__identity strong { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.member-card__identity span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.member-score { text-align: right; }
.member-score strong { display: block; font-size: 17px; font-weight: 780; letter-spacing: -.03em; line-height: 1; }
.member-score span { font-size: 8px; color: var(--muted); }
.member-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 13px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.member-metric { text-align: center; border-right: 1px solid var(--line); }
.member-metric:last-child { border-right: 0; }
.member-metric strong { display: block; font-size: 12px; font-weight: 720; }
.member-metric span { display: block; font-size: 8px; color: var(--muted); margin-top: 1px; }
.member-workload { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.member-workload__label { font-size: 8.5px; color: var(--muted); white-space: nowrap; }
.member-workload__bar { flex: 1; height: 4px; border-radius: 99px; background: #eef2f9; overflow: hidden; }
.member-workload__bar i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.member-workload__bar i.is-hot { background: var(--orange); }
.member-workload__bar i.is-over { background: var(--red); }
.member-workload__value { font-size: 8.5px; font-weight: 700; color: var(--muted); }
.member-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }

/* ---------- drawer / modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 70; background: rgba(11, 23, 54, .42); backdrop-filter: blur(2px); animation: fadeIn .18s ease; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  width: min(560px, 100vw);
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: -20px 0 60px rgba(11, 23, 54, .18);
  animation: drawerIn .24s cubic-bezier(.2, .8, .2, 1);
}
@keyframes drawerIn { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.drawer__head { flex: none; padding: 17px 20px 0; border-bottom: 1px solid var(--line); }
.drawer__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.drawer__top h2 { font-size: 18px; font-weight: 750; letter-spacing: -.03em; }
.drawer__top p { margin-top: 2px; font-size: 10.5px; color: var(--muted); }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px 20px 34px; }
.drawer-tabs { display: flex; gap: 18px; margin-top: 14px; }
.drawer-tabs button { position: relative; border: 0; background: transparent; padding: 0 0 10px; color: var(--muted); font-size: 11.5px; font-weight: 650; }
.drawer-tabs button.is-active { color: var(--text); }
.drawer-tabs button.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--blue); }

.profile-head { display: flex; align-items: flex-start; gap: 13px; }
.profile-head__main { flex: 1; min-width: 0; }
.profile-head__main h3 { font-size: 19px; font-weight: 760; letter-spacing: -.03em; }
.profile-head__main p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.profile-head__badges { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.profile-actions { display: flex; gap: 7px; margin-top: 14px; flex-wrap: wrap; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 18px; }
.info-item span { display: block; font-size: 9.5px; color: var(--muted); margin-bottom: 3px; }
.info-item strong { display: block; font-size: 11.5px; font-weight: 620; word-break: break-word; }
.info-item a { color: var(--blue); }
.drawer-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.drawer-section__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.drawer-section__head h4 { font-size: 11.5px; font-weight: 720; }
.drawer-section__head button { border: 0; background: none; color: var(--blue); font-size: 10px; font-weight: 650; }
.social-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 10.5px; }
.social-row .channel-badge { width: 25px; height: 25px; border-radius: 7px; }
.social-row span { flex: 1; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline { display: grid; gap: 0; }
.timeline-item { display: flex; gap: 10px; padding: 0 0 14px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: 12px; top: 24px; bottom: 0; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-icon { width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; z-index: 1; }
.timeline-icon .icon { width: 12px; height: 12px; }
.timeline-main { flex: 1; min-width: 0; padding-top: 2px; }
.timeline-main p { font-size: 10.5px; color: var(--text-2); line-height: 1.55; }
.timeline-main span { display: block; margin-top: 2px; font-size: 8.5px; color: var(--muted-2); }
.drawer-empty { padding: 25px 0; text-align: center; font-size: 10.5px; color: var(--muted); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(11, 23, 54, .46); backdrop-filter: blur(3px); animation: fadeIn .16s ease; }
.modal {
  width: min(560px, 100%);
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(11, 23, 54, .3);
  animation: modalIn .22s cubic-bezier(.2, .85, .25, 1);
}
.modal--lg { width: min(760px, 100%); }
.modal--sm { width: min(420px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal__head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 15px; border-bottom: 1px solid var(--line); }
.modal__head h2 { font-size: 17px; font-weight: 750; letter-spacing: -.03em; }
.modal__head p { margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.modal__body { overflow-y: auto; padding: 19px 22px; }
.modal__body--flush { padding: 0; }
.modal__foot { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 13px 22px; border-top: 1px solid var(--line); background: #fbfcff; border-radius: 0 0 20px 20px; }
.modal__foot .left { margin-right: auto; }
.modal-close { width: 31px; height: 31px; display: grid; place-items: center; border: 0; border-radius: 8px; background: #f5f7fb; color: var(--muted); }
.modal-close:hover { background: #edf1f8; color: var(--text); }

.confirm-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); margin-bottom: 12px; }
.confirm-text { font-size: 12.5px; color: var(--text-2); line-height: 1.7; }

/* settings */
.settings-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { padding: 7px; position: sticky; top: 92px; }
.settings-nav button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 600; text-align: left; }
.settings-nav button:hover { background: #f6f9fe; color: var(--text); }
.settings-nav button.is-active { background: var(--blue-soft); color: var(--blue); }
.settings-content { display: grid; gap: 15px; }
.settings-section { padding: 20px 22px; }
.settings-section__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.settings-section__head h3 { font-size: 14px; font-weight: 720; }
.settings-section__head p { margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.integration-card { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: .15s ease; }
.integration-card:hover { border-color: #cbd8ef; box-shadow: var(--shadow-sm); }
.integration-card__top { display: flex; align-items: flex-start; gap: 10px; }
.integration-card__main { flex: 1; min-width: 0; }
.integration-card__main strong { display: block; font-size: 12px; font-weight: 680; }
.integration-card__main span { display: block; margin-top: 2px; font-size: 9px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.integration-card__detail { margin-top: 9px; font-size: 9.5px; color: var(--muted); line-height: 1.55; }
.integration-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; padding-top: 9px; border-top: 1px solid #f0f3f9; }
.health-mini { display: flex; align-items: center; gap: 5px; font-size: 9px; color: var(--green); font-weight: 650; }
.health-mini i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.health-mini.is-off { color: var(--muted); }
.gateway-box { border: 1px solid #dbe6fb; border-radius: 14px; background: linear-gradient(145deg, #f6f9ff, #fbfdff); padding: 15px; }
.gateway-row { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.gateway-row label { width: 66px; flex: none; font-size: 9.5px; color: var(--muted); }
.gateway-value { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid #dde7f8; border-radius: 8px; background: #fff; font: 10px var(--mono); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #dde7f8; border-radius: 7px; background: #fff; color: var(--muted); flex: none; }
.copy-btn:hover { color: var(--blue); border-color: #b7caf0; }
.code-block { margin-top: 12px; padding: 13px; border-radius: 10px; background: #0d1a3d; color: #b9cdf5; font: 10px/1.7 var(--mono); overflow-x: auto; white-space: pre; }
.code-block .tok-blue { color: #7fb0ff; }
.code-block .tok-green { color: #7ee2b8; }
.group-manage-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.group-manage-row:last-child { border-bottom: 0; }
.group-manage-row .dot { width: 8px; height: 8px; border-radius: 50%; }
.group-manage-row__main { flex: 1; min-width: 0; }
.group-manage-row__main strong { display: block; font-size: 11.5px; font-weight: 650; }
.group-manage-row__main span { display: block; font-size: 9px; color: var(--muted); }
.role-table { width: 100%; border-collapse: collapse; }
.role-table th { padding: 8px 10px; text-align: left; background: #f8faff; font-size: 9px; color: var(--muted); font-weight: 700; }
.role-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 10.5px; }
.role-table tr:last-child td { border-bottom: 0; }

/* ---------- login ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.12fr .88fr; background: #fff; }
.login-visual {
  position: relative;
  overflow: hidden;
  padding: 44px clamp(36px, 6vw, 80px);
  color: #fff;
  background:
    radial-gradient(700px 500px at 75% 25%, rgba(34, 211, 238, .18), transparent 62%),
    radial-gradient(700px 600px at 5% 100%, rgba(79, 134, 255, .38), transparent 66%),
    linear-gradient(140deg, #08142f, #0e2350 55%, #1b4aa6);
  display: flex;
  flex-direction: column;
}
.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(120deg, transparent 5%, #000 50%, transparent 95%);
}
.login-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.login-brand strong { display: block; font-size: 17px; letter-spacing: -.03em; }
.login-brand span { display: block; font-size: 9px; letter-spacing: .18em; color: #8fa8d3; }
.login-copy { position: relative; z-index: 1; margin-top: clamp(50px, 9vh, 110px); max-width: 620px; }
.login-copy .eyebrow { color: #69d8e9; }
.login-copy h1 { margin-top: 15px; font-size: clamp(34px, 3.7vw, 57px); line-height: 1.16; font-weight: 780; letter-spacing: -.055em; }
.login-copy h1 em { font-style: normal; background: linear-gradient(100deg, #8ab5ff, #5de4ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-copy p { margin-top: 18px; max-width: 500px; color: #a8bcdd; font-size: 13.5px; line-height: 1.8; }
.login-features { display: grid; gap: 11px; margin-top: 30px; max-width: 500px; }
.login-feature { display: flex; align-items: flex-start; gap: 10px; }
.login-feature__icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #8ec7ff; flex: none; }
.login-feature .icon { width: 13px; height: 13px; }
.login-feature p { font-size: 11.5px; color: #c1d2ec; line-height: 1.55; }
.login-feature p strong { color: #fff; font-weight: 650; }
.login-preview {
  position: absolute;
  right: clamp(-40px, 2vw, 50px);
  bottom: clamp(40px, 6vh, 80px);
  z-index: 1;
  width: 310px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .04));
  backdrop-filter: blur(16px);
  box-shadow: 0 28px 70px rgba(2, 8, 23, .32);
  transform: rotate(-2.5deg);
}
.login-preview__head { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.login-preview__head div { flex: 1; }
.login-preview__head strong { display: block; font-size: 10.5px; }
.login-preview__head span { display: block; font-size: 8px; color: #94acd4; }
.login-preview__msg { margin-top: 9px; padding: 8px 10px; border-radius: 9px 9px 9px 3px; background: rgba(255, 255, 255, .1); font-size: 9.5px; line-height: 1.55; color: #dce8fb; max-width: 92%; }
.login-preview__msg--out { margin-left: auto; border-radius: 9px 9px 3px 9px; background: linear-gradient(135deg, #3d78ff, #5f93ff); color: #fff; }
.login-preview__stats { display: flex; gap: 8px; margin-top: 11px; }
.login-preview__stats div { flex: 1; padding: 7px; border-radius: 8px; background: rgba(255, 255, 255, .07); }
.login-preview__stats strong { display: block; font-size: 12px; }
.login-preview__stats span { display: block; font-size: 7px; color: #94acd4; }
.login-proof { position: relative; z-index: 1; margin-top: auto; display: flex; align-items: center; gap: 14px; color: #8fa8d3; font-size: 9.5px; }
.login-proof .avatar-stack .avatar { width: 27px; height: 27px; border-radius: 9px; font-size: 9px; border-color: #102550; }

.login-form-side { display: flex; align-items: center; justify-content: center; padding: 30px; background: #fff; }
.login-card { width: min(386px, 100%); }
.login-card__head { margin-bottom: 25px; }
.login-card__head .brand-mark { display: none; }
.login-card__head h2 { font-size: 25px; font-weight: 780; letter-spacing: -.04em; }
.login-card__head p { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.login-form { display: grid; gap: 15px; }
.login-form .input { height: 47px; border-radius: 12px; font-size: 13.5px; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 13px; top: 15px; color: var(--muted); width: 17px; height: 17px; }
.input-icon .input { padding-left: 40px; }
.login-submit { height: 48px; margin-top: 4px; border-radius: 12px; font-size: 14px; }
.demo-hint { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; padding: 10px 12px; border: 1px dashed #d9e3f4; border-radius: 10px; background: #f8faff; color: var(--muted); font-size: 10px; line-height: 1.6; }
.demo-hint .icon { color: var(--blue); margin-top: 1px; }
.demo-hint code { font-family: var(--mono); color: var(--text-2); background: #edf2fb; border-radius: 4px; padding: 0 4px; }
.login-error { display: none; padding: 9px 11px; border-radius: 9px; background: var(--red-soft); color: #c22f2f; font-size: 11px; }
.login-error.is-on { display: block; }
.login-foot { margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 9.5px; color: var(--muted-2); }
.login-foot a:hover { color: var(--blue); }
.password-toggle { position: absolute; right: 7px; top: 7px; width: 33px; height: 33px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.password-toggle:hover { background: #f1f5fb; }

/* ---------- utility ---------- */
.toast-root { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 8px; pointer-events: none; }
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 230px;
  max-width: 360px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-size: 11.5px;
  font-weight: 550;
  box-shadow: 0 16px 40px rgba(11, 23, 54, .28);
  animation: toastIn .24s ease both;
  pointer-events: auto;
}
.toast .icon { color: #6ee7b7; }
.toast--error .icon { color: #fca5a5; }
.toast.is-out { animation: toastOut .2s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 46px 20px; text-align: center; color: var(--muted); }
.empty-state__icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.empty-state strong { font-size: 12.5px; color: var(--text); }
.empty-state p { font-size: 10.5px; max-width: 300px; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.section-title h3 { font-size: 13px; font-weight: 720; }
.muted { color: var(--muted); }
.text-blue { color: var(--blue); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-orange { color: #c07a09; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px !important; }
.mt-12 { margin-top: 12px !important; }
.mt-16 { margin-top: 16px !important; }
.mt-20 { margin-top: 20px !important; }
.mb-12 { margin-bottom: 12px !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.grow { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mobile-only { display: none; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.kbd { font: 10px var(--mono); padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; background: #f8faff; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 1440px) {
  .member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid--three { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr); }
  .dash-grid--three > :last-child { grid-column: span 2; }
}
@media (max-width: 1280px) {
  :root { --sidebar: 84px; }
  .sidebar { padding: 0 10px 14px; }
  .sidebar__brand { justify-content: center; padding: 0; }
  .sidebar__brand .brand-text, .nav-label, .nav-item__label, .sidebar__footer .plan-card { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item .nav-badge { position: absolute; top: 5px; right: 7px; min-width: 16px; height: 16px; font-size: 8px; }
  .sidebar__nav { padding-top: 6px; }
  .nav-label { height: 0; padding: 0; overflow: hidden; }
  .sidebar__footer { display: none; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .inbox-shell { grid-template-columns: 290px minmax(0, 1fr); }
  .contact-panel { display: none; }
}
@media (min-width: 901px) and (max-width: 1280px) {
  :root { --sidebar: 94px; }
  .sidebar { padding: 0 8px 14px; }
  .nav-item {
    height: 61px;
    padding: 6px 2px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
  }
  .nav-item__label {
    display: block;
    flex: none;
    width: 100%;
    padding: 0 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    font-size: 9.5px;
    line-height: 1.15;
  }
  .nav-item .nav-badge {
    top: 4px;
    right: 9px;
  }
  .nav-item.is-active::before {
    left: -8px;
    top: 10px;
    bottom: 10px;
  }
}

@media (max-width: 1180px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-grid--three { grid-template-columns: 1fr 1fr; }
  .dash-grid--three > :last-child { grid-column: span 2; }
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .hero__focus { max-width: 560px; }
  .member-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar__search { max-width: 330px; }
  .online-pill { display: none; }
}
@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline-stats, .marketing-stats { grid-template-columns: repeat(2, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: 1fr; }
  .campaign-grid { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .settings-nav button { width: auto; white-space: nowrap; }
  .inbox-shell { grid-template-columns: 1fr; height: calc(100vh - 180px); }
  .inbox-list { display: none; border-right: 0; }
  .inbox-shell.has-active .inbox-list { display: none; }
  .inbox-shell:not(.has-active) .inbox-list { display: flex; }
  .inbox-shell:not(.has-active) .thread { display: none; }
  .inbox-shell.has-active .thread { display: flex; }
  .thread { display: flex; }
  .topbar { padding: 0 22px; }
  .page { padding: 20px 22px 60px; }
  .topbar__title h2 { font-size: 16px; }
  .topbar__search { max-width: 280px; }
}
@media (max-width: 900px) {
  :root { --topbar: 66px; }
  .sidebar { transform: translateX(-100%); width: 250px; transition: transform .24s ease; padding: 0 14px 16px; box-shadow: 30px 0 70px rgba(11, 23, 54, .3); }
  .sidebar.is-open { transform: none; }
  .sidebar__brand { justify-content: flex-start; padding: 0 8px; }
  .sidebar__brand .brand-text, .nav-item__label, .sidebar__footer .plan-card { display: block; }
  .nav-label { height: auto; padding: 16px 12px 7px; }
  .nav-item { justify-content: flex-start; padding: 0 12px; }
  .nav-item .nav-badge { position: static; min-width: 19px; height: 19px; font-size: 10px; }
  .sidebar__footer { display: block; }
  .main { margin-left: 0; }
  .mobile-menu-btn { display: inline-grid; }
  .mobile-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 55;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 19px;
    background: rgba(11, 23, 54, .96);
    box-shadow: 0 18px 44px rgba(11, 23, 54, .34);
    backdrop-filter: blur(14px);
  }
  .mobile-nav button { flex: 1; height: 100%; border: 0; background: transparent; color: #8fa2c7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 8.5px; font-weight: 600; border-radius: 12px; }
  .mobile-nav button.is-active { color: #fff; background: rgba(47, 107, 255, .22); }
  .mobile-nav .icon { width: 19px; height: 19px; }
  .page { padding: 18px 16px 104px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar__title .eyebrow { display: none; }
  .topbar__title h2 { font-size: 15px; }
  .topbar__search { max-width: none; }
  .topbar__search .input { height: 38px; font-size: 12px; }
  .topbar__search kbd { display: none; }
  .topbar__actions .btn--primary span { display: none; }
  .topbar__actions .btn--primary { width: 38px; padding: 0; }
  .user-chip__meta { display: none; }
  .topbar__divider { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .page-head__actions { width: 100%; justify-content: flex-start; }
  .hero { padding: 22px 20px; border-radius: 20px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 12px; }
  .hero__focus { max-width: none; }
  .dash-grid--three { grid-template-columns: 1fr; }
  .dash-grid--three > :last-child { grid-column: auto; }
  .member-grid { grid-template-columns: 1fr; }
  .team-banner { flex-direction: column; align-items: flex-start; }
  .team-banner__avatars { position: absolute; right: 20px; top: 20px; }
  .calendar__day { min-height: 78px; }
  .cal-event { font-size: 8px; }
  .table-card .data-table { display: none; }
  .customer-mobile-list { display: block; }
  .toolbar .search-box { max-width: none; }
  .mobile-only { display: inline-grid; }
  .inbox-shell { height: calc(100dvh - 300px); min-height: 420px; }
  .thread__head .mobile-only { margin-right: -2px; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-form-side { padding: 24px; }
  .login-card__head .brand-mark { display: grid; margin-bottom: 18px; }
  .bulk-bar { bottom: 86px; }
}
@media (max-width: 720px) {
  .kpi-grid { gap: 10px; }
  .kpi { padding: 14px; border-radius: 15px; }
  .kpi__value { font-size: 24px; }
  .kpi__spark { display: none; }
  .hero__focus { display: none; }
  .hero::after { display: none; }
  .card { border-radius: 17px; }
  .card__head { padding: 16px 16px 0; }
  .card__body { padding: 14px 16px 17px; }
  .card__foot { padding: 11px 16px; }
  .chart-wrap { height: 170px; }
  .calendar { overflow-x: auto; }
  .calendar__weekdays, .calendar__days { min-width: 560px; }
  .calendar__day { min-height: 88px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .pipeline-stats, .marketing-stats, .stat-strip { grid-template-columns: 1fr 1fr; gap: 9px; }
  .pipeline-stat, .marketing-stat { padding: 11px; }
  .pipeline-stat__copy strong { font-size: 14px; }
  .template-grid { grid-template-columns: 1fr; }
  .integration-grid { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; }
  .modal__foot { border-radius: 0; }
  .drawer { width: 100%; }
  .drawer__body { padding: 16px 16px 30px; }
  .toast-root { left: 12px; right: 12px; bottom: 82px; }
  .toast { max-width: none; width: 100%; }
  .page-head__copy h1 { font-size: 22px; }
  .campaign-metrics { grid-template-columns: repeat(4, 1fr); }
  .settings-section { padding: 16px; }
  .bulk-bar { width: calc(100vw - 24px); justify-content: space-between; padding-left: 12px; }
  .bulk-bar span { font-size: 10.5px; }
  .bulk-bar .btn span { display: none; }
  .topbar__title { display: none; }
  .topbar__search { flex: 1; }
  .thread__messages { padding: 14px; }
  .msg { max-width: 86%; }
  .quick-replies { padding-left: 10px; padding-right: 10px; }
  .workload-chart { height: 120px; }
}
@media (max-width: 480px) {
  .hero { padding: 20px 17px; }
  .hero h1 { font-size: 25px; }
  .hero__actions .btn { flex: 1; min-width: 120px; }
  .hero__actions .btn--primary { flex: 1.3; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi__label { font-size: 10px; }
  .kpi__icon { width: 29px; height: 29px; border-radius: 8px; }
  .kpi__icon .icon { width: 16px; height: 16px; }
  .target-main { flex-direction: column; text-align: center; }
  .target-copy .badge { margin-top: 7px; }
  .pipeline-stats, .marketing-stats, .stat-strip { grid-template-columns: 1fr 1fr; }
  .group-tabs { gap: 5px; }
  .group-tabs .pill { height: 31px; padding: 0 10px; font-size: 11px; }
  .toolbar { padding: 10px; gap: 8px; }
  .toolbar .select { flex: 1; min-width: calc(50% - 4px); }
  .toolbar .search-box { min-width: 100%; }
  .info-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .login-form-side { padding: 20px; }
  .login-card__head h2 { font-size: 23px; }
  .member-card__head .avatar { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
