@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  font-family: 'DM Sans', sans-serif;
  color: #182230;
  background: #f4f7fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #778397;
  --border: #e8edf4;
  --blue: #4f7cff;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; }
.dashboard { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 48px 0 28px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 9px; color: #71809a; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font: 800 clamp(25px, 3vw, 34px)/1.2 'Manrope', sans-serif; letter-spacing: -.04em; }
.subtitle, .panel-heading p { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.period { display: inline-flex; align-items: center; gap: 9px; flex: none; padding: 10px 14px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: #647187; font-size: 12px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #39bd88; }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.filter-groups { display: flex; align-items: center; gap: 10px; }
.period-filters { display: flex; padding: 4px; gap: 3px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.filter-button { padding: 8px 11px; border: 0; border-radius: 7px; background: transparent; color: #718096; cursor: pointer; font: 600 12px 'DM Sans', sans-serif; transition: background .2s ease, color .2s ease; }
.filter-button:hover { color: #476ed9; }
.filter-button.is-active { background: #edf2ff; color: #4169d8; }
.status-filter select { appearance: none; min-height: 38px; padding: 0 30px 0 12px; border: 1px solid var(--border); border-radius: 9px; outline: 0; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23718096' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 11px center; color: #526077; cursor: pointer; font: 600 12px 'DM Sans', sans-serif; }
.status-filter select:focus { border-color: #9bb2fb; box-shadow: 0 0 0 3px #edf2ff; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
.search-field { display: flex; width: min(100%, 236px); align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: #8995a7; }
.search-field:focus-within { border-color: #9bb2fb; box-shadow: 0 0 0 3px #edf2ff; }
.search-field span { font-size: 17px; line-height: 1; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #344055; font: 500 12px 'DM Sans', sans-serif; }
.search-field input::placeholder { color: #9aa5b4; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 20px; }
.metric-card, .panel { border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgb(28 49 84 / 3%); }
.metric-card { padding: 22px 24px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-label { color: #667389; font-size: 13px; font-weight: 600; }
.metric-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; font-size: 17px; font-weight: 700; }
.icon-blue { color: #4b75e8; background: #edf2ff; }.icon-green { color: #1eaa74; background: #e9f8f1; }.icon-purple { color: #8462dd; background: #f2edff; }
.metric-value { display: block; margin-top: 15px; font: 800 32px/1 'Manrope', sans-serif; letter-spacing: -.04em; }
.metric-note { display: block; margin-top: 9px; color: #98a2b1; font-size: 12px; }
.content-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; margin-bottom: 20px; }
.panel { padding: 22px 24px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
h2 { margin-bottom: 5px; font: 700 16px/1.35 'Manrope', sans-serif; letter-spacing: -.02em; }
.panel-heading p { font-size: 12px; }
.chart-total, .table-count { color: #748197; font-size: 12px; font-weight: 600; }
.chart { display: grid; grid-template-columns: repeat(5, minmax(40px, 1fr)); align-items: end; gap: clamp(12px, 3vw, 35px); height: 206px; margin-top: 19px; padding: 12px 8px 0; border-bottom: 1px solid var(--border); background: repeating-linear-gradient(to bottom, transparent 0, transparent 50px, #f0f3f8 51px, transparent 52px); }
.chart-column { display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: flex-end; gap: 9px; }
.chart-bar-wrap { display: flex; width: 100%; height: 160px; align-items: flex-end; justify-content: center; }
.chart-bar { position: relative; width: min(38px, 70%); min-height: 5px; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, #79a1ff, #4f7cff); cursor: default; outline: 0; transition: height .35s ease; }
.chart-bar:focus-visible { box-shadow: 0 0 0 3px #dce6ff; }
.chart-tooltip { position: absolute; z-index: 1; bottom: calc(100% + 8px); left: 50%; padding: 5px 8px; border-radius: 5px; background: #25334d; color: #fff; font: 600 10px/1 'DM Sans', sans-serif; opacity: 0; pointer-events: none; transform: translate(-50%, 4px); transition: opacity .15s ease, transform .15s ease; white-space: nowrap; }
.chart-tooltip::after { position: absolute; top: 100%; left: 50%; border: 4px solid transparent; border-top-color: #25334d; content: ''; transform: translateX(-50%); }
.chart-bar:hover .chart-tooltip, .chart-bar:focus .chart-tooltip { opacity: 1; transform: translate(-50%, 0); }
.chart-label { padding-bottom: 9px; color: #78859a; font-size: 11px; text-align: center; }
.channel-legend { display: grid; gap: 16px; margin: 25px 0 0; padding: 0; list-style: none; }
.legend-row { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; color: #68758a; font-size: 12px; }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; }
.legend-row strong { color: #293447; font-size: 12px; }
.table-panel { padding-bottom: 8px; }
.table-heading { align-items: center; margin-bottom: 18px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { padding: 11px 12px; border-top: 1px solid #eff2f6; color: #8a95a5; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
td { padding: 13px 12px; border-top: 1px solid #eff2f6; color: #647187; font-size: 12px; }
td:first-child { color: #2c3749; font-weight: 600; }
.lead-email { color: #8590a0; }
.badge { display: inline-block; padding: 5px 9px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.badge-converted { color: #16835a; background: #e7f7ef; }.badge-progress { color: #a66c0a; background: #fff4dc; }.badge-new { color: #5771c7; background: #edf1ff; }
.empty-state { padding: 28px 12px; color: #8a95a5; text-align: center; }
footer { padding-top: 19px; color: #9aa4b2; font-size: 11px; text-align: center; }

@media (max-width: 760px) {
  .dashboard { width: min(100% - 32px, 560px); padding-top: 30px; }
  .page-header { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .controls { align-items: stretch; flex-direction: column; }
  .filter-groups { align-items: stretch; flex-direction: column; }
  .period-filters { width: 100%; justify-content: space-between; }
  .filter-button { flex: 1; padding-right: 6px; padding-left: 6px; }
  .status-filter select { width: 100%; }
  .search-field { width: 100%; }
  .metrics { grid-template-columns: 1fr; gap: 12px; }
  .metric-card { padding: 17px 19px; }
  .metric-value { margin-top: 10px; font-size: 28px; }
  .content-grid { grid-template-columns: 1fr; gap: 12px; }
  .panel { padding: 19px; }
  .chart { gap: 10px; height: 190px; }
  .chart-bar-wrap { height: 145px; }
}
@media (max-width: 430px) {
  .dashboard { width: calc(100% - 24px); }
  .panel { padding: 16px 13px; }
  .chart { gap: 5px; padding-right: 2px; padding-left: 2px; }
  .chart-label { font-size: 9px; }
  th, td { padding-right: 9px; padding-left: 9px; }
}
