:root {
  --ink: #0a2015;
  --ink-2: #153b29;
  --gold: #c6a556;
  --gold-light: #dfc98f;
  --paper: #f3f5f2;
  --white: #fff;
  --text: #15251c;
  --muted: #718078;
  --line: #dfe5e1;
  --danger: #c65f5f;
  --success: #23946a;
  --radius: 18px;
  --shadow: 0 18px 55px rgba(20, 39, 29, 0.08);
  --font: "DM Sans", sans-serif;
  --font-heading: "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

button {
  border: 0;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

[hidden] {
  display: none !important;
}

.eyebrow,
.panel-kicker {
  display: block;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.admin-brand img {
  width: 38px;
  height: 46px;
  object-fit: contain;
}

.admin-brand-light .admin-brand-logo {
  width: 46px;
  height: 54px;
  filter:
    brightness(0)
    saturate(100%)
    invert(83%)
    sepia(30%)
    saturate(784%)
    hue-rotate(358deg)
    brightness(91%)
    contrast(88%)
    drop-shadow(0 5px 12px rgba(0, 0, 0, 0.22));
}

.admin-brand span {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.admin-brand strong {
  font-family: var(--font-heading);
  font-size: 1.02rem;
}

.admin-brand small {
  margin-top: 5px;
  color: var(--gold-light);
  font-size: 0.57rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.admin-brand-light {
  color: var(--white);
}

/* Login */
.admin-login {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 0.9fr) minmax(500px, 1.1fr);
}

.login-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  padding: 48px clamp(36px, 5vw, 80px);
  background:
    linear-gradient(145deg, rgba(6, 31, 20, 0.93), rgba(4, 20, 13, 0.98)),
    url("assets/2aoboqatymfglhet71hi10ui6edilx6ij1v9ltjg14.jpg") center / cover;
  flex-direction: column;
  justify-content: space-between;
}

.login-visual::before {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(223, 201, 143, 0.13);
  border-radius: 22px;
  content: "";
  pointer-events: none;
}

.visual-glow {
  position: absolute;
  right: -15%;
  bottom: 8%;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  background: rgba(198, 165, 86, 0.11);
  filter: blur(50px);
}

.login-quote {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.login-quote h1 {
  max-width: 620px;
  margin: 18px 0 22px;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 4.2vw, 4.8rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.login-quote p {
  max-width: 510px;
  color: rgba(255, 255, 255, 0.57);
  font-size: 0.94rem;
  line-height: 1.7;
}

.visual-foot {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.7rem;
}

.login-main {
  position: relative;
  display: grid;
  padding: 74px clamp(28px, 7vw, 120px);
  place-items: center;
}

.back-site {
  position: absolute;
  top: 36px;
  right: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.back-site svg {
  width: 18px;
}

.login-card {
  width: min(100%, 430px);
}

.login-mark {
  display: none;
}

.login-card h2 {
  margin: 12px 0 8px;
  font-family: var(--font-heading);
  font-size: 2.3rem;
  letter-spacing: -0.045em;
}

.login-description {
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.admin-field {
  display: block;
  margin-bottom: 18px;
}

.admin-field > span:first-child {
  display: block;
  margin-bottom: 8px;
  color: #425048;
  font-size: 0.71rem;
  font-weight: 700;
}

.field-control {
  position: relative;
  display: flex;
  align-items: center;
}

.field-control > svg {
  position: absolute;
  left: 15px;
  width: 19px;
  color: #89958e;
  pointer-events: none;
}

.field-control input,
.admin-field > input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-control input {
  height: 52px;
  padding: 0 48px 0 46px;
}

.admin-field select {
  height: 46px;
  padding: 0 13px;
}

.admin-field > input {
  height: 46px;
  padding: 0 13px;
}

.admin-field textarea {
  min-height: 105px;
  padding: 12px 14px;
  resize: vertical;
}

.field-control input:focus,
.admin-field > input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: rgba(198, 165, 86, 0.85);
  box-shadow: 0 0 0 4px rgba(198, 165, 86, 0.1);
}

.password-toggle {
  position: absolute;
  right: 8px;
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  color: #87938c;
  cursor: pointer;
  place-items: center;
}

.password-toggle svg {
  width: 19px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, background-color 0.2s ease;
}

.primary-action {
  background: var(--ink);
  color: var(--white);
}

.login-card > .primary-action {
  width: 100%;
  height: 52px;
  margin-top: 4px;
}

.primary-action svg,
.secondary-action svg {
  width: 18px;
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.primary-action:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.primary-action.compact {
  min-height: 42px;
  background: var(--gold);
  color: var(--ink);
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
}

.form-message {
  min-height: 21px;
  margin: -5px 0 8px;
  color: var(--danger);
  font-size: 0.72rem;
  line-height: 1.5;
}

.form-message.success {
  color: var(--success);
}

.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 20px;
  color: #8b9790;
  font-size: 0.66rem;
}

.security-note svg {
  width: 15px;
}

/* Dashboard shell */
.admin-app {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 250px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  padding: 28px 20px 20px;
  background:
    radial-gradient(circle at 20% 0%, rgba(198, 165, 86, 0.1), transparent 30%),
    var(--ink);
  flex-direction: column;
}

.admin-sidebar .admin-brand {
  min-height: 82px;
  margin: 0 8px 42px;
  overflow: visible;
}

.sidebar-brand-emblem {
  display: flex;
  width: 72px;
  flex: 0 0 72px;
  align-items: center;
  flex-direction: column;
}

.sidebar-brand-symbol {
  display: block !important;
  width: 72px;
  height: 58px;
  overflow: hidden;
}

.admin-sidebar .admin-brand-logo {
  display: block;
  width: 72px;
  height: auto;
  max-height: none;
  object-fit: initial;
}

.admin-brand .sidebar-brand-label {
  display: block;
  margin-top: 3px;
  color: var(--gold-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-label {
  margin: 0 11px 10px;
  color: rgba(255, 255, 255, 0.32);
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-nav {
  display: flex;
  gap: 5px;
  flex-direction: column;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 13px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(255, 255, 255, 0.085);
  color: var(--white);
}

.admin-nav a.active {
  box-shadow: inset 3px 0 var(--gold);
}

.admin-nav svg {
  width: 20px;
}

.nav-count {
  min-width: 22px;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.6rem;
  text-align: center;
}

.sidebar-account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 15px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-live {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.live-dot {
  position: relative;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #53d69f;
  box-shadow: 0 0 0 5px rgba(83, 214, 159, 0.1);
}

.sidebar-live > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.sidebar-live strong {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.65rem;
}

.sidebar-live small {
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.55rem;
}

.account-avatar {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 700;
  place-items: center;
}

.sidebar-account > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.sidebar-account strong {
  overflow: hidden;
  color: var(--white);
  font-size: 0.72rem;
  text-overflow: ellipsis;
}

.sidebar-account small {
  color: rgba(255, 255, 255, 0.36);
  font-size: 0.58rem;
}

.sidebar-account button {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  margin-left: auto;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  place-items: center;
}

.sidebar-account button svg {
  width: 17px;
}

.admin-content {
  min-width: 0;
  padding: 40px clamp(24px, 4vw, 62px) 70px;
}

.admin-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.admin-header h1 {
  margin: 6px 0 5px;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.2vw, 3rem);
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.admin-header p {
  color: var(--muted);
  font-size: 0.73rem;
}

.header-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(35, 148, 106, 0.17);
  border-radius: 999px;
  background: rgba(35, 148, 106, 0.07);
  color: #278161;
  font-size: 0.59rem;
  font-weight: 700;
}

.live-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #35a979;
  box-shadow: 0 0 0 3px rgba(53, 169, 121, 0.11);
}

.header-actions {
  display: flex;
  gap: 9px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric-card {
  position: relative;
  display: flex;
  min-height: 184px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 30px rgba(20, 39, 29, 0.04);
  flex-direction: column;
}

.metric-card::after {
  position: absolute;
  right: -30px;
  bottom: -45px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(34, 148, 106, 0.035);
  content: "";
}

.metric-icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 19px;
  border-radius: 10px;
  background: rgba(35, 148, 106, 0.1);
  color: var(--success);
  place-items: center;
}

.metric-icon.violet {
  background: #f0ebff;
  color: #7554ca;
}

.metric-icon.gold {
  background: #f8f0dc;
  color: #aa8122;
}

.metric-icon.blue {
  background: #e9f2ff;
  color: #4f7fbd;
}

.metric-icon.coral {
  background: #fff0ec;
  color: #c86f58;
}

.metric-icon svg {
  width: 20px;
}

.metric-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.metric-card > strong {
  margin: 2px 0 3px;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 2rem;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.metric-card > strong i {
  margin-left: 2px;
  font-size: 0.9rem;
  font-style: normal;
}

.metric-card small {
  margin-top: auto;
  color: #8a9690;
  font-size: 0.62rem;
}

.metric-card small b {
  color: var(--success);
}

.pipeline-panel {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 2fr);
  gap: 28px;
  margin-bottom: 14px;
  padding: 22px 24px;
  background:
    linear-gradient(115deg, rgba(198, 165, 86, 0.06), transparent 42%),
    var(--white);
}

.pipeline-heading h2 {
  margin-top: 5px;
  font-family: var(--font-heading);
  font-size: 1.17rem;
  letter-spacing: -0.035em;
}

.pipeline-heading p {
  max-width: 330px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.55;
}

.pipeline-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pipeline-grid::before {
  position: absolute;
  top: 23px;
  right: 9%;
  left: 9%;
  height: 1px;
  background: linear-gradient(90deg, #e5ba4f, #79a8de, #55b88e, #8b74ba);
  content: "";
  opacity: 0.45;
}

.pipeline-grid article {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.pipeline-number {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border: 5px solid var(--white);
  border-radius: 50%;
  background: #fff3dc;
  box-shadow: 0 5px 18px rgba(30, 52, 40, 0.1);
  color: #9b6d12;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  place-items: center;
}

.pipeline-grid article[data-pipeline-status="contacted"] .pipeline-number {
  background: #e9f2ff;
  color: #416eaa;
}

.pipeline-grid article[data-pipeline-status="qualified"] .pipeline-number {
  background: #e9f7f1;
  color: #277c5d;
}

.pipeline-grid article[data-pipeline-status="closed"] .pipeline-number {
  background: #eeeaf8;
  color: #695592;
}

.pipeline-grid article > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.pipeline-grid strong {
  color: #3d4c43;
  font-size: 0.66rem;
}

.pipeline-grid small {
  margin-top: 2px;
  color: #9aa39e;
  font-size: 0.56rem;
}

.insights-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.75fr);
  gap: 14px;
  margin-bottom: 14px;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 30px rgba(20, 39, 29, 0.04);
}

.chart-panel,
.source-panel {
  min-height: 385px;
  padding: 24px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.panel-heading h2 {
  margin-top: 5px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  letter-spacing: -0.035em;
}

.chart-legend {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-size: 0.62rem;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-views {
  background: var(--ink-2);
}

.legend-leads {
  background: var(--gold);
}

.chart-wrap {
  height: 275px;
  margin-top: 20px;
}

.chart-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid {
  stroke: #edf0ee;
  stroke-width: 1;
}

.chart-bar {
  fill: rgba(21, 59, 41, 0.12);
  stroke: none;
}

.chart-bar:hover {
  fill: rgba(21, 59, 41, 0.28);
}

.chart-line {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.5;
}

.chart-dot {
  fill: var(--white);
  stroke: var(--gold);
  stroke-width: 2;
}

.chart-label {
  fill: #8b9690;
  stroke: none;
  font-family: var(--font);
  font-size: 9px;
}

.source-list {
  display: flex;
  gap: 14px;
  margin-top: 26px;
  flex-direction: column;
}

.source-item {
  display: grid;
  align-items: center;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
}

.source-icon {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eff4f1;
  color: var(--ink-2);
  place-items: center;
}

.source-icon svg {
  width: 17px;
}

.source-item span:nth-child(2) {
  display: flex;
  color: #39483f;
  font-size: 0.7rem;
  font-weight: 600;
  flex-direction: column;
}

.source-item small {
  margin-top: 2px;
  color: #95a098;
  font-size: 0.58rem;
  font-weight: 400;
}

.source-item strong {
  font-family: var(--font-heading);
  font-size: 1rem;
}

.week-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
  padding: 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--white);
}

.week-summary span {
  color: rgba(255, 255, 255, 0.57);
  font-size: 0.66rem;
}

.week-summary strong {
  color: var(--gold-light);
  font-family: var(--font-heading);
  font-size: 1.25rem;
}

.leads-panel {
  overflow: hidden;
}

.leads-heading {
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.lead-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-control {
  position: relative;
  display: flex;
  align-items: center;
}

.search-control svg {
  position: absolute;
  left: 12px;
  width: 17px;
  color: #8c9791;
}

.search-control input,
.lead-tools select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: #fafbf9;
  color: #48574f;
  font-size: 0.68rem;
}

.search-control input {
  width: 230px;
  padding: 0 12px 0 38px;
}

.lead-tools select {
  padding: 0 30px 0 11px;
}

.crm-focus-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 9px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.crm-focus-bar button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e5eae6;
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.crm-focus-bar button:hover,
.crm-focus-bar button.active {
  transform: translateY(-1px);
  border-color: rgba(198, 165, 86, 0.72);
  box-shadow: 0 7px 20px rgba(31, 53, 41, 0.07);
}

.crm-focus-bar button > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.crm-focus-bar strong {
  font-family: var(--font-heading);
  font-size: 1rem;
  line-height: 1;
}

.crm-focus-bar small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-icon {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  place-items: center;
}

.focus-icon svg {
  width: 17px;
}

.focus-icon.overdue {
  background: #fff0ec;
  color: #c05f48;
}

.focus-icon.today {
  background: #e9f2ff;
  color: #416eaa;
}

.focus-icon.hot {
  background: #fff3dc;
  color: #a86f08;
}

.crm-focus-bar .focus-clear {
  justify-content: center;
  padding-inline: 16px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
}

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

.lead-table {
  width: 100%;
  border-collapse: collapse;
}

.lead-table th {
  padding: 12px 18px;
  background: #fafbf9;
  color: #89958e;
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
}

.lead-table td {
  padding: 15px 18px;
  border-top: 1px solid #edf0ee;
  color: #4c5a52;
  font-size: 0.68rem;
  vertical-align: middle;
}

.lead-table tbody tr {
  transition: background-color 0.2s ease;
}

.lead-table tbody tr:hover {
  background: #fbfcfa;
}

.lead-person {
  display: flex;
  min-width: 180px;
  flex-direction: column;
}

.lead-person strong {
  color: var(--text);
  font-size: 0.75rem;
}

.lead-person a {
  margin-top: 3px;
  color: var(--success);
  font-size: 0.64rem;
  font-weight: 600;
}

.lead-interest {
  display: flex;
  min-width: 115px;
  flex-direction: column;
}

.lead-interest small {
  margin-top: 2px;
  color: #9aa49e;
}

.lead-crm-meta {
  display: flex;
  min-width: 135px;
  align-items: flex-start;
  gap: 5px;
  flex-direction: column;
}

.temperature-badge {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f1f3f1;
  color: #69756e;
  font-size: 0.56rem;
  font-weight: 700;
  white-space: nowrap;
}

.temperature-badge[data-temperature="hot"] {
  background: #fff0e8;
  color: #b85d35;
}

.temperature-badge[data-temperature="warm"] {
  background: #fff5df;
  color: #9b6d12;
}

.temperature-badge[data-temperature="cold"] {
  background: #edf3f8;
  color: #52728d;
}

.follow-up-label {
  display: flex;
  color: #919b95;
  font-size: 0.57rem;
  line-height: 1.35;
  flex-direction: column;
}

.follow-up-label b {
  color: #627068;
}

.follow-up-label[data-follow-up-state="overdue"] b {
  color: var(--danger);
}

.follow-up-label[data-follow-up-state="today"] b {
  color: #3e74ae;
}

.source-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eff4f1;
  color: #536159;
  font-size: 0.58rem;
  font-weight: 700;
  white-space: nowrap;
}

.source-badge::before,
.status-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #91a099;
  content: "";
}

.status-badge[data-status="new"] {
  background: #fff3dc;
  color: #9b6d12;
}

.status-badge[data-status="new"]::before {
  background: #d59b29;
}

.status-badge[data-status="contacted"] {
  background: #e9f2ff;
  color: #416eaa;
}

.status-badge[data-status="contacted"]::before {
  background: #6191ce;
}

.status-badge[data-status="qualified"] {
  background: #e9f7f1;
  color: #277c5d;
}

.status-badge[data-status="qualified"]::before {
  background: #3ca477;
}

.status-badge[data-status="closed"] {
  background: #eeeaf8;
  color: #695592;
}

.status-badge[data-status="closed"]::before {
  background: #8069ad;
}

.row-action {
  display: grid;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  color: #748078;
  cursor: pointer;
  place-items: center;
}

.row-action svg {
  width: 16px;
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
}

.empty-state > span {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #eff4f1;
  color: var(--ink-2);
  place-items: center;
}

.empty-state svg {
  width: 23px;
}

.empty-state h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
}

.empty-state p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.7rem;
}

.table-footer {
  display: flex;
  justify-content: space-between;
  padding: 13px 24px;
  border-top: 1px solid var(--line);
  color: #79867f;
  font-size: 0.63rem;
}

.table-footer small {
  color: #a2aaa5;
}

/* Lead dialog */
.lead-dialog {
  width: min(780px, calc(100% - 28px));
  max-height: calc(100vh - 32px);
  margin: auto;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  background: transparent;
  box-shadow: var(--shadow);
}

.lead-dialog::backdrop {
  background: rgba(4, 18, 11, 0.68);
  backdrop-filter: blur(5px);
}

.dialog-card {
  padding: 26px;
  border-radius: 20px;
  background: var(--white);
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dialog-heading h2 {
  margin-top: 5px;
  font-family: var(--font-heading);
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.dialog-close {
  display: grid;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f2f4f1;
  color: #68756e;
  cursor: pointer;
  place-items: center;
}

.dialog-close svg {
  width: 18px;
}

.dialog-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.dialog-contact a,
.dialog-contact button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 9px;
  background: #eff4f1;
  color: var(--ink-2);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}

.dialog-contact svg {
  width: 15px;
}

.dialog-contact button {
  border: 1px solid var(--line);
  background: var(--white);
  color: #66736c;
}

.lead-details {
  display: grid;
  margin-bottom: 22px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fafbf9;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}

.lead-details div {
  min-width: 0;
}

.lead-details div.full {
  grid-column: 1 / -1;
}

.lead-details dt {
  margin-bottom: 3px;
  color: #929d97;
  font-size: 0.59rem;
  font-weight: 700;
  text-transform: uppercase;
}

.lead-details dd {
  color: #3d4b43;
  font-size: 0.7rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.dialog-crm-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dialog-crm-fields .full {
  grid-column: 1 / -1;
}

.activity-section {
  margin: 3px 0 18px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafbf9;
}

.activity-section > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.activity-section > div:first-child > small {
  color: var(--muted);
  font-size: 0.6rem;
}

.activity-timeline {
  display: flex;
  gap: 0;
  max-height: 270px;
  overflow-y: auto;
  padding: 0;
  list-style: none;
  flex-direction: column;
}

.activity-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  padding-bottom: 15px;
}

.activity-timeline li:not(:last-child)::before {
  position: absolute;
  top: 12px;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: #dfe5e1;
  content: "";
}

.activity-dot {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border: 3px solid #f7f9f7;
  border-radius: 50%;
  background: #8a9890;
  box-shadow: 0 0 0 1px #cfd8d2;
}

.activity-timeline li[data-activity-type="contact"] .activity-dot {
  background: var(--success);
}

.activity-timeline li[data-activity-type="follow-up"] .activity-dot {
  background: #4f7fbd;
}

.activity-timeline li[data-activity-type="priority"] .activity-dot {
  background: var(--gold);
}

.activity-timeline li > div > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.activity-timeline strong {
  color: #425048;
  font-size: 0.65rem;
}

.activity-timeline time {
  color: #99a39d;
  font-size: 0.56rem;
  white-space: nowrap;
}

.activity-timeline p {
  margin-top: 3px;
  color: #66736c;
  font-size: 0.65rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.activity-timeline .activity-empty {
  display: block;
  padding: 15px;
  border-radius: 10px;
  background: var(--white);
  color: var(--muted);
  font-size: 0.65rem;
  text-align: center;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.admin-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  max-width: 360px;
  padding: 13px 17px;
  transform: translateY(20px);
  border-radius: 11px;
  background: var(--ink);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
  color: var(--white);
  font-size: 0.72rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.admin-toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1180px) {
  .metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .source-panel {
    min-height: auto;
  }

  .source-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lead-tools {
    width: 100%;
  }

  .leads-heading {
    flex-direction: column;
  }

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

  .pipeline-panel {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .admin-login {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .login-main {
    min-height: 100vh;
  }

  .login-mark {
    display: block;
    width: 50px;
    margin-bottom: 25px;
  }

  .login-mark img {
    width: 100%;
  }

  .admin-app {
    display: block;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    padding: 14px 18px;
    flex-direction: row;
  }

  .admin-sidebar .admin-brand {
    margin: 0;
  }

  .admin-sidebar .admin-brand img {
    width: 54px;
    height: auto;
    max-height: none;
    object-fit: initial;
  }

  .sidebar-brand-emblem {
    width: 54px;
    flex-basis: 54px;
  }

  .sidebar-brand-symbol {
    width: 54px;
    height: 43px;
  }

  .admin-brand .sidebar-brand-label {
    margin-top: 2px;
    font-size: 0.45rem;
  }

  .sidebar-label,
  .admin-nav,
  .sidebar-live,
  .sidebar-account > span:nth-child(2),
  .sidebar-account .account-avatar {
    display: none;
  }

  .sidebar-account {
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
  }
}

@media (max-width: 680px) {
  .login-main {
    padding: 80px 22px 45px;
  }

  .back-site {
    top: 24px;
    right: 22px;
  }

  .admin-content {
    padding: 28px 15px 55px;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions > * {
    flex: 1;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .pipeline-panel {
    padding: 18px;
  }

  .pipeline-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px 8px;
  }

  .pipeline-grid::before {
    display: none;
  }

  .pipeline-grid article {
    justify-content: flex-start;
  }

  .metric-card {
    min-height: 158px;
    padding: 16px;
  }

  .metric-icon {
    margin-bottom: 13px;
  }

  .metric-card > strong {
    font-size: 1.65rem;
  }

  .chart-panel,
  .source-panel {
    padding: 18px;
  }

  .chart-legend {
    display: none;
  }

  .source-list {
    grid-template-columns: 1fr;
  }

  .lead-tools,
  .search-control,
  .search-control input,
  .lead-tools select {
    width: 100%;
  }

  .crm-focus-bar {
    grid-template-columns: 1fr;
    padding-inline: 14px;
  }

  .lead-table th:nth-child(2),
  .lead-table td:nth-child(2),
  .lead-table th:nth-child(3),
  .lead-table td:nth-child(3),
  .lead-table th:nth-child(4),
  .lead-table td:nth-child(4) {
    display: none;
  }

  .lead-table th,
  .lead-table td {
    padding-inline: 13px;
  }

  .table-footer {
    padding-inline: 14px;
  }

  .table-footer small {
    display: none;
  }

  .lead-details {
    grid-template-columns: 1fr;
  }

  .lead-details div.full {
    grid-column: auto;
  }

  .dialog-crm-fields {
    grid-template-columns: 1fr;
  }

  .dialog-crm-fields .full {
    grid-column: auto;
  }

  .activity-section > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .dialog-card {
    padding: 21px;
  }
}
