:root {
  color-scheme: light;
  --ink: #172536;
  --muted: #637387;
  --line: rgba(38, 58, 77, 0.12);
  --panel: rgba(255, 255, 255, 0.78);
  --panel-solid: #ffffff;
  --teal: #0f6f70;
  --teal-2: #168f86;
  --blue: #3866d9;
  --violet: #8356d9;
  --green: #2a9465;
  --coral: #d96754;
  --gold: #d9a441;
  --mint: #d7f1e8;
  --lilac: #e7e0f6;
  --sky: #dceaf7;
  --rose: #f6deda;
  --amber: #ffe4a8;
  --aqua: #c7f6f0;
  --orchid: #ead8ff;
  --shadow-deep: 14px 18px 42px rgba(60, 82, 104, 0.15);
  --shadow-soft: 7px 9px 18px rgba(72, 93, 112, 0.1), inset 4px 4px 12px rgba(255, 255, 255, 0.68);
  --radius: 16px;
  --font-body: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Sora, Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    linear-gradient(140deg, rgba(215, 241, 232, 0.9), rgba(220, 234, 247, 0.72) 36%, rgba(231, 224, 246, 0.58) 68%, rgba(246, 222, 218, 0.46)),
    #edf4f2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.crm-body {
  background:
    radial-gradient(circle at 10% 10%, rgba(199, 246, 240, 0.76), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(255, 228, 168, 0.72), transparent 25%),
    radial-gradient(circle at 82% 82%, rgba(234, 216, 255, 0.66), transparent 30%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2)),
    transparent;
}

.clay-panel,
.clay-card,
.clay-hero,
.chat-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  box-shadow: var(--shadow-deep), var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.crm-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 20px;
  width: min(1480px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0;
}

.crm-mobile-bar {
  display: none;
}

.crm-sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 48px);
  min-height: 0;
  padding: 18px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58)),
    linear-gradient(180deg, rgba(215, 241, 232, 0.72), rgba(231, 224, 246, 0.5));
}

.brand-lockup,
.user-chip,
.conversation-item,
.knowledge-item,
.section-heading,
.topbar,
header,
.composer,
.setup-grid {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 12px;
  min-height: 54px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(145deg, var(--teal), var(--teal-2));
  box-shadow: 8px 10px 20px rgba(13, 107, 104, 0.26), inset 3px 3px 8px rgba(255, 255, 255, 0.24);
}

.brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 15px;
  filter: drop-shadow(8px 10px 18px rgba(13, 107, 104, 0.22));
}

.hero-logo {
  width: 72px;
  height: 72px;
  border-radius: 22px;
}

.brand-lockup strong,
.user-chip strong,
.conversation-item strong,
.knowledge-item strong,
td strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

.brand-lockup small,
.user-chip small,
.conversation-item small,
.knowledge-item small,
td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.side-nav {
  display: grid;
  flex: 1 1 auto;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-top: 18px;
  padding-right: 4px;
  padding-bottom: 10px;
}

.side-nav a {
  position: relative;
  border-radius: 12px;
  color: #385066;
  font-weight: 800;
  font-size: 13px;
  padding: 9px 12px;
  transition: transform 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.side-nav a:hover,
.side-nav .active {
  color: var(--teal);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 4px 4px 12px rgba(127, 151, 169, 0.13), inset -4px -4px 12px rgba(255, 255, 255, 0.9);
}

.side-nav a:hover {
  transform: translateX(2px);
}

.side-nav a::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.42;
}

.sidebar-footer {
  display: grid;
  flex: 0 0 auto;
  gap: 14px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.user-chip {
  gap: 10px;
  min-width: 0;
}

.user-chip > span,
.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--teal);
  font-weight: 900;
  background: #e6fbf5;
  box-shadow: inset 3px 3px 8px rgba(80, 126, 120, 0.12), inset -3px -3px 8px rgba(255, 255, 255, 0.92);
}

.crm-main {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.crm-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 178px;
  padding: clamp(22px, 3vw, 32px);
  overflow: hidden;
  background:
    linear-gradient(108deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.74) 55%, rgba(255, 255, 255, 0.32) 100%),
    url("/static/customer-connections-hero.png") right center / 380px auto no-repeat,
    linear-gradient(110deg, rgba(215, 241, 232, 0.82), rgba(220, 234, 247, 0.68) 40%, rgba(231, 224, 246, 0.62) 72%, rgba(246, 222, 218, 0.44));
  border-color: rgba(255, 255, 255, 0.9);
}

.compact-hero {
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.74) 62%, rgba(255, 255, 255, 0.36)),
    url("/static/property-media/emerald-nest-wakad.png") right center / 270px auto no-repeat,
    linear-gradient(110deg, rgba(215, 241, 232, 0.82), rgba(220, 234, 247, 0.68) 44%, rgba(246, 222, 218, 0.5));
}

.compact-hero {
  min-height: 138px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  font-family: var(--font-display);
}

h1 {
  max-width: 720px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.06;
}

h2 {
  font-size: 17px;
}

.hero-copy {
  max-width: 720px;
  margin: 12px 0 0;
  color: #40576a;
  font-size: 14px;
  line-height: 1.55;
}

.hero-actions,
.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.primary-button,
.ghost-button,
.danger-button,
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 0;
  border-radius: 11px;
  font-weight: 900;
  font-size: 13px;
  padding: 0 15px;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-button,
button {
  color: #ffffff;
  background: linear-gradient(145deg, var(--teal), var(--blue));
  box-shadow: 9px 12px 24px rgba(13, 107, 104, 0.24), inset 2px 2px 7px rgba(255, 255, 255, 0.24);
}

.primary-button:hover,
button:hover,
.ghost-button:hover,
.button:hover {
  transform: translateY(-1px);
  filter: saturate(1.06);
}

.ghost-button,
.button {
  color: var(--teal);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 4px 4px 12px rgba(105, 126, 140, 0.12), inset -4px -4px 12px rgba(255, 255, 255, 0.95);
}

button.danger-button {
  min-height: 30px;
  border-radius: 999px;
  color: #a94435;
  background: #fde4de;
  box-shadow: inset 3px 3px 8px rgba(169, 68, 53, 0.08), inset -3px -3px 8px rgba(255, 255, 255, 0.78);
  font-size: 11px;
  padding: 0 12px;
}

.full-width {
  width: 100%;
}

.stats-grid,
.crm-grid,
.dashboard-grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(6, minmax(128px, 1fr));
}

.stat-card {
  position: relative;
  min-height: 104px;
  padding: 16px;
  overflow: hidden;
}

.stat-card:nth-child(2n)::before {
  background: linear-gradient(180deg, var(--blue), var(--violet), var(--gold));
}

.stat-card:nth-child(3n)::before {
  background: linear-gradient(180deg, var(--coral), var(--gold), var(--green));
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--teal), var(--blue), var(--coral));
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 26px;
  line-height: 1;
}

.crm-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.create-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.knowledge-grid {
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
}

.clay-panel {
  min-width: 0;
  padding: 18px;
}

.section-heading {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.count-pill,
.status-pill,
.sender-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 11px;
  white-space: nowrap;
}

.count-pill {
  color: var(--teal);
  background: #e4faf2;
}

.mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(236, 241, 255, 0.82);
  font-size: 12px;
  font-weight: 900;
  padding: 6px 12px;
  box-shadow: inset 3px 3px 8px rgba(80, 98, 140, 0.08), inset -3px -3px 8px rgba(255, 255, 255, 0.86);
}

.status-pill {
  color: #385066;
  background: #eef3f7;
}

.status-open,
.status-indexed,
.status-calendar_created {
  color: var(--teal);
  background: #dff7ee;
}

.status-calendar_pending,
.status-requested {
  color: #8a6408;
  background: #fff1c8;
}

.status-needs_exact_time {
  color: #a94435;
  background: #fde4de;
}

.status-human_required {
  color: #a94435;
  background: #fde4de;
}

.status-trial,
.status-new {
  color: var(--blue);
  background: #e8efff;
}

.status-active,
.status-won,
.status-high {
  color: var(--green);
  background: #dff7ee;
}

.status-qualified,
.status-follow_up,
.status-proposal,
.status-medium {
  color: #8a6408;
  background: #fff1c8;
}

.status-lost,
.status-low,
.status-past_due {
  color: #a94435;
  background: #fde4de;
}

.status-booked {
  color: #8a6408;
  background: #fff1c8;
}

.status-closed {
  color: #57636f;
  background: #e7edf2;
}

.crm-form,
.stack-form {
  display: grid;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(57, 82, 101, 0.13);
  border-radius: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  outline: none;
  font-size: 13px;
  padding: 10px 13px;
  box-shadow: inset 4px 4px 11px rgba(109, 132, 149, 0.12), inset -4px -4px 11px rgba(255, 255, 255, 0.92);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(17, 132, 126, 0.45);
  box-shadow: 0 0 0 4px rgba(17, 132, 126, 0.12), inset 4px 4px 11px rgba(109, 132, 149, 0.1);
}

textarea {
  min-height: 126px;
  resize: vertical;
}

.file-drop {
  display: grid;
  gap: 9px;
  border: 1px dashed rgba(13, 107, 104, 0.34);
  border-radius: 15px;
  background: rgba(230, 251, 245, 0.64);
  padding: 14px;
}

.file-drop span {
  color: #456074;
  font-size: 13px;
  font-weight: 800;
}

.soft-divider,
.panel-divider {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: 16px 0;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 9px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.conversation-list,
.knowledge-list,
.message-list {
  display: grid;
  gap: 10px;
}

.conversation-item,
.knowledge-item {
  gap: 12px;
  justify-content: space-between;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.58);
  padding: 12px;
  box-shadow: inset 4px 4px 12px rgba(108, 130, 148, 0.08), inset -4px -4px 12px rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.65);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.conversation-item:hover,
.knowledge-item:hover,
.message-row:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 102, 217, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

.rich-list {
  gap: 11px;
}

.item-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.item-actions form {
  margin: 0;
}

.conversation-item > div:nth-child(2),
.knowledge-item > div {
  min-width: 0;
  flex: 1;
}

.activity-panel {
  margin-bottom: 10px;
}

.message-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.56);
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.sender-chip {
  color: var(--teal);
  background: #e3faf2;
}

.message-row p {
  margin: 0;
  color: #33495d;
  font-size: 14px;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.plan-strip,
.pricing-grid,
.pipeline-strip {
  display: grid;
  gap: 12px;
}

.plan-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plan-card,
.pricing-card,
.demo-script p,
.pipeline-strip span {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 4px 4px 12px rgba(108, 130, 148, 0.08), inset -4px -4px 12px rgba(255, 255, 255, 0.82);
}

.plan-card {
  display: grid;
  gap: 5px;
  padding: 13px;
}

.plan-card span,
.pricing-card span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.plan-card strong {
  font-size: 18px;
}

.plan-card small {
  color: var(--muted);
  font-size: 11px;
}

.pricing-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.pricing-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.pricing-card strong {
  color: var(--ink);
  font-size: 28px;
}

.pricing-card strong small {
  color: var(--muted);
  font-size: 12px;
}

.pricing-card p {
  min-height: 46px;
  margin: 0;
  color: #40576a;
  font-size: 13px;
  line-height: 1.45;
}

.pricing-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-card li,
.demo-script p,
.pipeline-strip span {
  color: #385066;
  font-size: 13px;
}

.pricing-card li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--teal), var(--blue));
}

.demo-script {
  display: grid;
  gap: 10px;
}

.demo-script p {
  margin: 0;
  padding: 12px;
  line-height: 1.45;
}

.pipeline-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pipeline-strip span {
  display: grid;
  min-height: 48px;
  place-items: center;
  color: var(--teal);
  font-weight: 900;
  padding: 10px;
}

.inline-form {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.inline-form select,
.item-actions select {
  min-width: 138px;
  min-height: 36px;
}

.usage-meter {
  position: relative;
  display: block;
  width: 120px;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(204, 216, 228, 0.72);
  box-shadow: inset 2px 2px 6px rgba(83, 105, 124, 0.16), inset -2px -2px 6px rgba(255, 255, 255, 0.76);
}

.wide-meter {
  width: 100%;
}

.saas-overview-grid,
.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-export-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.export-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(14, 116, 144, 0.16);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(239, 246, 255, 0.96));
  color: #0f3e45;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 12px 24px rgba(31, 41, 55, 0.07);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.export-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(14, 116, 144, 0.36);
}

.form-hint {
  grid-column: 1 / -1;
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.subscription-card {
  display: grid;
  gap: 10px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(230, 251, 245, 0.82), rgba(255, 255, 255, 0.68));
  box-shadow: inset 4px 4px 12px rgba(108, 130, 148, 0.08), inset -4px -4px 12px rgba(255, 255, 255, 0.82);
  padding: 16px;
}

.subscription-card strong {
  font-size: 20px;
}

.subscription-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.checklist-list {
  display: grid;
  gap: 10px;
}

.checklist-list span {
  position: relative;
  min-height: 42px;
  border-radius: 13px;
  color: #52697b;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 4px 4px 12px rgba(108, 130, 148, 0.08), inset -4px -4px 12px rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 900;
  padding: 12px 14px 12px 40px;
}

.checklist-list span::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(99, 115, 135, 0.36);
  border-radius: 999px;
  transform: translateY(-50%);
}

.checklist-list .done {
  color: var(--teal);
  background: rgba(230, 251, 245, 0.78);
}

.checklist-list .done::before {
  border-color: var(--teal);
  background: radial-gradient(circle, var(--teal) 46%, transparent 50%);
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.compact-channels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.channel-card {
  display: grid;
  gap: 7px;
  min-height: 116px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 4px 4px 12px rgba(108, 130, 148, 0.08), inset -4px -4px 12px rgba(255, 255, 255, 0.82);
  padding: 14px;
}

.channel-card strong {
  font-size: 14px;
}

.channel-card span {
  width: fit-content;
  border-radius: 999px;
  color: #385066;
  background: #eef3f7;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 9px;
}

.channel-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.channel-card.status-connected {
  background: linear-gradient(145deg, rgba(230, 251, 245, 0.88), rgba(255, 255, 255, 0.66));
}

.channel-card.status-connected span {
  color: var(--teal);
  background: #dff7ee;
}

.channel-card.status-setup_needed {
  background: linear-gradient(145deg, rgba(255, 241, 200, 0.88), rgba(255, 255, 255, 0.66));
}

.channel-card.status-setup_needed span {
  color: #8a6408;
  background: #fff1c8;
}

.channel-card.status-disabled {
  opacity: 0.76;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-radius: 13px;
  color: #385066;
  background: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 900;
  padding: 10px 12px;
  box-shadow: inset 4px 4px 12px rgba(108, 130, 148, 0.08), inset -4px -4px 12px rgba(255, 255, 255, 0.82);
}

.toggle-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--teal);
  box-shadow: none;
}

.lead-task-form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1.2fr 0.7fr 0.7fr 1.1fr auto;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.lead-task-form input {
  min-height: 36px;
}

.usage-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--coral));
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
}

.pagination-bar > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.pagination-bar > div {
  display: flex;
  gap: 8px;
  align-items: center;
}

.disabled-link {
  opacity: 0.46;
  pointer-events: none;
}

.muted-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 420px);
  gap: 22px;
  align-items: center;
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0;
  isolation: isolate;
}

.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.78;
  pointer-events: none;
}

.auth-shell::before {
  width: 260px;
  height: 260px;
  top: 10%;
  right: 18%;
  background: radial-gradient(circle, rgba(22, 143, 134, 0.22), rgba(22, 143, 134, 0));
  animation: login-drift-a 12s ease-in-out infinite;
}

.auth-shell::after {
  width: 320px;
  height: 320px;
  left: 4%;
  bottom: 8%;
  background: radial-gradient(circle, rgba(217, 103, 84, 0.2), rgba(217, 103, 84, 0));
  animation: login-drift-b 14s ease-in-out infinite;
}

.auth-brand {
  position: relative;
  min-height: 420px;
  padding: clamp(24px, 4vw, 40px);
  overflow: hidden;
  background:
    linear-gradient(128deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.62) 54%, rgba(255, 255, 255, 0.32)),
    url("/static/customer-connections-hero.png") right bottom / min(440px, 58%) auto no-repeat,
    linear-gradient(145deg, rgba(215, 241, 232, 0.88), rgba(232, 239, 255, 0.72), rgba(255, 241, 200, 0.52));
  animation: login-rise 680ms ease-out both;
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: -35%;
  background:
    linear-gradient(115deg, transparent 34%, rgba(255, 255, 255, 0.42) 48%, transparent 62%);
  transform: translateX(-42%) rotate(8deg);
  animation: login-sheen 6s ease-in-out infinite;
  pointer-events: none;
}

.auth-brand .brand-mark,
.auth-brand .brand-logo {
  margin-bottom: 26px;
  animation: brand-breathe 3.6s ease-in-out infinite;
}

.auth-brand h1 {
  font-size: clamp(30px, 4vw, 44px);
}

.login-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.62)),
    linear-gradient(160deg, rgba(230, 251, 245, 0.68), rgba(253, 228, 222, 0.42));
  animation: login-rise 780ms ease-out 120ms both;
}

.login-panel h1 {
  font-size: 28px;
}

.login-panel input {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.login-panel input:focus {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
}

.login-panel .primary-button {
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.login-panel .primary-button:hover {
  transform: translateY(-2px);
  filter: saturate(1.06);
  box-shadow: 12px 16px 30px rgba(13, 107, 104, 0.28), inset 2px 2px 7px rgba(255, 255, 255, 0.28);
}

.login-panel .primary-button:active {
  transform: translateY(0);
}

.error {
  margin: 0;
  border-radius: 14px;
  color: #9c372b;
  font-weight: 800;
  background: #ffe7e2;
  padding: 12px 14px;
}

.app-shell,
.dashboard-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.chat-panel {
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding: 20px;
}

.setup-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 12px;
  justify-content: space-between;
  margin: 20px 0;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 12px 0;
}

.bubble-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 760px;
}

.bubble-wrap.user {
  align-self: flex-end;
  align-items: flex-end;
}

.bubble-wrap.assistant {
  align-self: flex-start;
  align-items: flex-start;
}

.bubble {
  border-radius: 16px;
  padding: 12px 14px;
  white-space: pre-wrap;
}

.bubble.user {
  background: #d8f4ee;
}

.bubble.assistant {
  background: rgba(255, 255, 255, 0.72);
}

.option-list {
  display: grid;
  gap: 6px;
  width: min(360px, 100%);
}

.quick-option {
  width: 100%;
  border: 1px solid rgba(13, 107, 104, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--teal);
  padding: 10px 12px;
  text-align: center;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  justify-content: space-between;
}

.landing-body {
  background:
    radial-gradient(circle at 8% 18%, rgba(199, 246, 240, 0.9), transparent 27%),
    radial-gradient(circle at 92% 16%, rgba(255, 228, 168, 0.76), transparent 24%),
    radial-gradient(circle at 76% 80%, rgba(234, 216, 255, 0.78), transparent 30%),
    linear-gradient(140deg, rgba(215, 241, 232, 0.96), rgba(220, 234, 247, 0.78) 34%, rgba(231, 224, 246, 0.66) 70%, rgba(246, 222, 218, 0.52)),
    #eef6f4;
}

.landing-nav {
  position: sticky;
  z-index: 20;
  top: 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 14px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  padding: 12px 14px;
}

.hamburger-button {
  display: none;
  width: 42px;
  min-height: 42px;
  border-radius: 14px;
  padding: 0;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 4px 4px 11px rgba(109, 132, 149, 0.12), inset -4px -4px 11px rgba(255, 255, 255, 0.92);
}

.hamburger-button span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  transition: transform 180ms ease, opacity 180ms ease;
}

.hamburger-button span + span {
  margin-top: 4px;
}

.menu-open .hamburger-button span:nth-child(1),
.hamburger-button[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-open .hamburger-button span:nth-child(2),
.hamburger-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-open .hamburger-button span:nth-child(3),
.hamburger-button[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu-action {
  display: none;
}

.landing-nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.landing-nav nav a {
  border-radius: 999px;
  color: #415a70;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 11px;
}

.landing-nav nav a:hover {
  color: var(--teal);
  background: rgba(230, 251, 245, 0.78);
}

.landing-hero,
.landing-section,
.landing-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.landing-hero {
  position: relative;
  min-height: min(720px, calc(100vh - 112px));
  overflow: hidden;
  border-radius: 28px;
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.83) 42%, rgba(255, 255, 255, 0.46) 78%),
    url("/static/property-media/harbour-crown-thane.png") right 8% bottom 8% / min(520px, 45vw) auto no-repeat,
    linear-gradient(145deg, rgba(215, 241, 232, 0.92), rgba(220, 234, 247, 0.76) 44%, rgba(246, 222, 218, 0.58));
  box-shadow: 18px 24px 64px rgba(57, 78, 96, 0.18);
  padding: clamp(28px, 6vw, 74px);
}

.landing-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding-top: clamp(18px, 4vw, 44px);
}

.landing-hero h1 {
  max-width: 760px;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.04;
}

.landing-hero-copy > p:not(.eyebrow) {
  max-width: 610px;
  margin: 18px 0 0;
  color: #3c556a;
  font-size: 16px;
  line-height: 1.62;
}

.landing-hero .hero-actions {
  margin-top: 24px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 28px;
}

.trust-row span {
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  color: #31536a;
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 900;
  padding: 8px 12px;
  box-shadow: inset 3px 3px 9px rgba(91, 116, 134, 0.08), inset -3px -3px 9px rgba(255, 255, 255, 0.85);
}

.hero-product-card {
  position: absolute;
  right: clamp(18px, 4vw, 56px);
  bottom: clamp(18px, 4vw, 48px);
  z-index: 1;
  width: min(520px, 48%);
  min-height: 360px;
  padding: 16px;
  transform: rotate(-1.5deg);
}

.mock-window-bar {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
}

.mock-window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--coral);
}

.mock-window-bar span:nth-child(2) {
  background: var(--gold);
}

.mock-window-bar span:nth-child(3) {
  background: var(--green);
}

.mock-dashboard {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
}

.mock-dashboard aside,
.mock-dashboard section,
.mock-kpi-grid span,
.mock-chat-row {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 4px 4px 12px rgba(108, 130, 148, 0.08), inset -4px -4px 12px rgba(255, 255, 255, 0.82);
}

.mock-dashboard aside {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 286px;
  padding: 14px;
}

.mock-dashboard aside strong,
.mock-kpi-grid strong {
  color: var(--teal);
}

.mock-dashboard aside span,
.mock-chat-row {
  color: #40576a;
  font-size: 12px;
  font-weight: 800;
}

.mock-dashboard section {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.mock-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mock-kpi-grid span {
  display: grid;
  gap: 6px;
  min-height: 70px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  padding: 11px;
}

.mock-kpi-grid strong {
  font-size: 20px;
}

.mock-chat-row {
  padding: 11px 12px;
}

.mock-chat-row.user {
  justify-self: end;
  max-width: 82%;
  background: #dff7ee;
}

.mock-chat-row.bot {
  justify-self: start;
  max-width: 88%;
}

.landing-section {
  margin-top: 26px;
}

.metric-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-band article {
  min-height: 118px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.metric-band article:nth-child(1) {
  background: linear-gradient(145deg, rgba(230, 251, 245, 0.9), rgba(255, 255, 255, 0.66));
}

.metric-band article:nth-child(2) {
  background: linear-gradient(145deg, rgba(232, 239, 255, 0.9), rgba(255, 255, 255, 0.66));
}

.metric-band article:nth-child(3) {
  background: linear-gradient(145deg, rgba(255, 241, 200, 0.9), rgba(255, 255, 255, 0.66));
}

.metric-band article:nth-child(4) {
  background: linear-gradient(145deg, rgba(253, 228, 222, 0.82), rgba(255, 255, 255, 0.66));
}

.metric-band strong {
  display: block;
  color: var(--teal);
  font-size: 30px;
  line-height: 1;
}

.metric-band span {
  display: block;
  margin-top: 9px;
  color: #415a70;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.landing-heading {
  align-items: end;
  margin-bottom: 16px;
}

.landing-heading p {
  max-width: 470px;
  margin: 0;
  color: #4f6679;
  font-size: 14px;
  line-height: 1.5;
}

.landing-heading h2,
.split-feature h2 {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.06;
}

.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.industry-card {
  min-height: 190px;
  padding: 18px;
  overflow: hidden;
  position: relative;
}

.industry-card::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -44px;
  width: 148px;
  height: 148px;
  border-radius: 38px;
  background: linear-gradient(145deg, rgba(15, 111, 112, 0.14), rgba(56, 102, 217, 0.16), rgba(217, 103, 84, 0.12));
  transform: rotate(16deg);
}

.industry-card span {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  color: var(--teal);
  background: #e4faf2;
  font-size: 12px;
  font-weight: 900;
}

.industry-card h3 {
  margin: 18px 0 8px;
  font-size: 18px;
}

.industry-card p,
.split-feature p,
.feature-list span {
  margin: 0;
  color: #4a6073;
  font-size: 14px;
  line-height: 1.55;
}

.split-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-soft);
  padding: clamp(20px, 4vw, 34px);
}

.split-feature p {
  margin-top: 14px;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feature-list article {
  min-height: 132px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 4px 4px 12px rgba(108, 130, 148, 0.08), inset -4px -4px 12px rgba(255, 255, 255, 0.82);
  padding: 15px;
}

.feature-list strong {
  display: block;
  margin-bottom: 8px;
  color: #21374d;
}

.landing-pricing .pricing-card {
  min-height: 354px;
}

.featured-plan {
  border-color: rgba(15, 111, 112, 0.28);
  background:
    linear-gradient(145deg, rgba(230, 251, 245, 0.78), rgba(255, 255, 255, 0.7)),
    rgba(255, 255, 255, 0.7);
  transform: translateY(-8px);
}

.pricing-card:nth-child(1) {
  background: linear-gradient(145deg, rgba(230, 251, 245, 0.82), rgba(255, 255, 255, 0.68));
}

.pricing-card:nth-child(3) {
  background: linear-gradient(145deg, rgba(232, 239, 255, 0.82), rgba(255, 255, 255, 0.68));
}

.demo-section {
  margin-bottom: 26px;
}

.landing-chat {
  min-height: 520px;
  border-radius: 22px;
}

.landing-chat .messages {
  min-height: 260px;
}

.landing-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  color: #4d6478;
  font-size: 13px;
  font-weight: 800;
  padding: 22px 0 34px;
}

.landing-footer span:first-child {
  color: var(--teal);
}

@media (max-width: 1180px) {
  body:has(.crm-sidebar.menu-open) {
    overflow: hidden;
  }

  .crm-mobile-bar {
    position: sticky;
    z-index: 35;
    top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100% - 20px, 100%);
    margin: 10px auto 0;
    padding: 12px;
  }

  .crm-mobile-bar .hamburger-button {
    display: inline-grid;
    place-items: center;
  }

  .crm-shell {
    grid-template-columns: 1fr;
    padding-top: 12px;
  }

  .crm-sidebar {
    position: fixed;
    z-index: 40;
    top: 0;
    left: 0;
    width: min(336px, calc(100vw - 42px));
    height: 100vh;
    border-radius: 0 22px 22px 0;
    transform: translateX(-110%);
    transition: transform 220ms ease, box-shadow 220ms ease;
  }

  .crm-sidebar.menu-open {
    transform: translateX(0);
    box-shadow: 28px 0 70px rgba(24, 38, 52, 0.26), var(--shadow-soft);
  }

  .side-nav {
    max-height: calc(100vh - 190px);
    overflow-y: auto;
  }
}

@media (max-width: 940px) {
  .crm-hero,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .crm-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-grid,
  .crm-grid,
  .create-grid,
  .knowledge-grid,
  .saas-overview-grid,
  .settings-grid,
  .setup-grid,
  .pricing-grid,
  .plan-strip,
  .pipeline-strip,
  .channel-grid,
  .compact-channels,
  .lead-task-form {
    grid-template-columns: 1fr;
  }

  .auth-brand {
  min-height: 300px;
  }

  .landing-nav {
    grid-template-columns: 1fr auto;
  }

  .landing-nav > .button {
    display: none;
  }

  .landing-nav .hamburger-button {
    display: inline-grid;
    place-items: center;
  }

  .landing-nav nav {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 7px;
    border-top: 1px solid var(--line);
    margin-top: 8px;
    padding-top: 12px;
  }

  .landing-nav.menu-open nav {
    display: grid;
  }

  .landing-nav nav a {
    min-height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.62);
  }

  .mobile-menu-action {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    background: linear-gradient(145deg, var(--teal), var(--blue)) !important;
  }

  .landing-hero {
    min-height: auto;
    padding-bottom: 340px;
  }

  .hero-product-card {
    width: calc(100% - 36px);
    right: 18px;
  }

  .metric-band,
  .industry-grid,
  .split-feature,
  .feature-list {
    grid-template-columns: 1fr;
  }

  .featured-plan {
    transform: none;
  }
}

@media (max-width: 640px) {
  .crm-shell,
  .app-shell,
  .dashboard-shell,
  .auth-shell {
    width: min(100% - 20px, 100%);
    padding: 10px 0;
  }

  .clay-panel,
  .crm-hero,
  .login-panel,
  .auth-brand {
    border-radius: 18px;
    padding: 16px;
  }

  .side-nav {
    grid-template-columns: repeat(5, minmax(116px, 1fr));
  }

  .sidebar-footer,
  .message-row,
  header,
  .topbar {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .conversation-item,
  .knowledge-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .inline-form,
  .item-actions {
    width: 100%;
  }

  .inline-form select,
  .item-actions select {
    min-width: 0;
    flex: 1;
  }

  .usage-meter {
    width: 100%;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }

  .landing-nav,
  .landing-hero,
  .landing-section,
  .landing-footer {
    width: min(100% - 20px, 100%);
  }

  .landing-nav {
    position: static;
    grid-template-columns: 1fr;
  }

  .landing-nav .brand-lockup {
    width: 100%;
  }

  .landing-nav .hamburger-button {
    position: absolute;
    right: 14px;
    top: 13px;
  }

  .crm-mobile-bar {
    border-radius: 16px;
  }

  .crm-sidebar {
    width: min(314px, calc(100vw - 28px));
  }

  .landing-hero {
    border-radius: 20px;
    padding: 22px 16px 318px;
  }

  .landing-hero h1 {
    font-size: 30px;
  }

  .landing-hero-copy > p:not(.eyebrow) {
    font-size: 14px;
  }

  .hero-product-card {
    min-height: 270px;
    padding: 12px;
  }

  .mock-dashboard {
    grid-template-columns: 1fr;
  }

  .mock-dashboard aside {
    display: none;
  }

  .mock-kpi-grid {
    grid-template-columns: 1fr;
  }

  .metric-band article,
  .industry-card,
  .feature-list article {
    min-height: 0;
  }

  .landing-heading {
    align-items: start;
  }

  .landing-footer {
    flex-direction: column;
  }
}

@keyframes login-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes brand-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 8px 10px 20px rgba(13, 107, 104, 0.24), inset 3px 3px 8px rgba(255, 255, 255, 0.24);
  }
  50% {
    transform: translateY(-2px) scale(1.035);
    box-shadow: 12px 16px 28px rgba(13, 107, 104, 0.3), inset 3px 3px 10px rgba(255, 255, 255, 0.3);
  }
}

@keyframes login-sheen {
  0%,
  38% {
    transform: translateX(-48%) rotate(8deg);
    opacity: 0;
  }
  52% {
    opacity: 0.82;
  }
  76%,
  100% {
    transform: translateX(52%) rotate(8deg);
    opacity: 0;
  }
}

@keyframes login-drift-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(22px, 18px, 0) scale(1.08);
  }
}

@keyframes login-drift-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-18px, -20px, 0) scale(1.06);
  }
}

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