.dashboard-header .brand {
  min-width: 260px;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(340px, 0.97fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 72px);
}

.hero-copy-block {
  max-width: 860px;
}

.dashboard-hero h1 {
  max-width: 900px;
  font-size: clamp(2.55rem, 6vw, 5.45rem);
  line-height: 0.96;
}

.dashboard-subtitle {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.8vw, 1.25rem);
}

.label-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.label-row span,
.status-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 10px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid rgba(23, 107, 82, 0.12);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.hero-dashboard-card,
.pain-grid article,
.login-card,
.delivery-card,
.dashboard-shell-live,
.chart-card,
.table-card,
.admin-card,
.scope-grid-live article,
.proof-grid-live article,
.package-card-live,
.snippet-copy-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-dashboard-card {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 24px);
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(23, 107, 82, 0.13);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(18px);
}

.mini-dashboard-top,
.chart-header,
.table-toolbar,
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-kicker {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mini-dashboard-top h2,
.app-topbar h2 {
  font-size: clamp(1.45rem, 2.8vw, 2.4rem);
}

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

.mini-metrics div,
.metric-grid article,
.settings-grid article {
  min-width: 0;
  padding: 14px;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-metrics strong,
.mini-metrics span,
.metric-grid strong,
.metric-grid span,
.settings-grid strong,
.settings-grid span {
  display: block;
}

.mini-metrics strong,
.metric-grid strong,
.settings-grid strong {
  color: var(--ink);
}

.mini-metrics span,
.metric-grid span,
.settings-grid span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.mini-chart {
  display: flex;
  align-items: end;
  gap: 9px;
  min-height: 180px;
  padding: 16px;
  background: #102027;
  border-radius: 8px;
}

.mini-chart span {
  flex: 1;
  min-height: 28px;
  background: linear-gradient(180deg, #86d0b6, #2e8f70);
  border-radius: 7px 7px 0 0;
}

.mini-table {
  display: grid;
  gap: 8px;
}

.mini-table span {
  height: 20px;
  background: #e7eeee;
  border-radius: 7px;
}

.pain-grid,
.scope-grid-live,
.proof-grid-live {
  display: grid;
  gap: 14px;
}

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

.pain-grid article,
.scope-grid-live article,
.proof-grid-live article {
  padding: 18px;
}

.pain-grid span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 50%;
  font-size: 0.83rem;
  font-weight: 900;
}

.pain-grid p,
.delivery-card p,
.scope-grid-live p,
.proof-grid-live p,
.package-card-live p,
.snippet-copy-card p,
.final-cta p,
.compact-heading p {
  color: var(--muted);
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(300px, 440px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.login-card,
.delivery-card {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 24px);
}

.credential-box {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(23, 107, 82, 0.16);
  border-radius: 8px;
}

.credential-box span {
  color: #315148;
  font-weight: 800;
}

.login-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.login-card input,
.table-controls input,
.table-controls select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
}

.table-controls button {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(23, 107, 82, 0.22);
  border-radius: 8px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.table-controls button:hover,
.table-controls button:focus-visible {
  color: #ffffff;
  background: var(--accent);
  outline: none;
}

.login-error {
  margin: 0;
  padding: 10px 12px;
  color: #8f2e28;
  background: #fff1ef;
  border: 1px solid #f0c1bd;
  border-radius: 8px;
  font-weight: 850;
}

.login-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.delivery-card {
  align-content: center;
  background: #102027;
  color: #ffffff;
}

.delivery-card ul,
.package-list-live ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
}

.delivery-card li,
.package-list-live li {
  color: #dbe7e4;
}

.dashboard-state-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 14px;
  color: #315148;
  background: var(--accent-soft);
  border: 1px solid rgba(23, 107, 82, 0.16);
  border-radius: 8px;
}

.dashboard-state-banner.active {
  color: #ffffff;
  background: var(--accent);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 6px rgba(23, 107, 82, 0.14);
}

.dashboard-shell-live {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  overflow: hidden;
}

.dashboard-shell-live.locked {
  opacity: 0.82;
}

.app-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 100%;
  padding: 18px;
  color: #dbe7e4;
  background: #102027;
}

.app-sidebar strong {
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 1.1rem;
}

.app-sidebar span {
  padding: 9px 10px;
  color: #a8bdc3;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 850;
}

.app-sidebar .active {
  color: #102027;
  background: #dff1ea;
}

.app-main {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: clamp(16px, 3vw, 22px);
}

.period-toggle,
.status-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.period-toggle button,
.status-filters button,
.snippet-copy-card button {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  font-weight: 850;
  cursor: pointer;
}

.period-toggle button.active,
.period-toggle button:hover,
.period-toggle button:focus-visible,
.status-filters button.active,
.status-filters button:hover,
.status-filters button:focus-visible {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
  outline: none;
}

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

.metric-grid strong {
  margin-top: 4px;
  font-size: clamp(1.26rem, 2.1vw, 1.62rem);
}

.metric-grid small {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 7px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.metric-grid article,
.chart-card,
.table-card,
.admin-card,
.login-card,
.delivery-card,
.scope-grid-live article,
.proof-grid-live article,
.package-card-live,
.snippet-copy-card {
  box-shadow: var(--shadow-soft);
}

.metric-grid article,
.chart-card,
.table-card,
.admin-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.metric-grid article:hover,
.chart-card:hover,
.table-card:hover,
.admin-card:hover {
  transform: translateY(-2px);
  border-color: rgba(23, 107, 82, 0.18);
  box-shadow: var(--shadow-strong);
}

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

.insight-grid article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.insight-grid strong,
.insight-grid p {
  display: block;
  margin: 0;
}

.insight-grid strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.insight-grid p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.85fr);
  gap: 14px;
}

.chart-card {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 2vw, 20px);
  min-width: 0;
}

.trend-chart {
  grid-column: 1 / -1;
}

.chart-meta {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.chart-meta span {
  color: var(--signal);
  font-weight: 900;
}

.chart-meta small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

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

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-dot.revenue {
  background: var(--accent);
}

.legend-line {
  width: 20px;
  height: 2px;
  background: #c8d6d2;
}

.bar-chart-live {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  min-height: 270px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(245, 248, 246, 0.94)),
    #f5f8f6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chart-axis {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  align-items: start;
  padding-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.chart-plot {
  position: relative;
  display: flex;
  align-items: end;
  gap: 10px;
  min-width: 0;
  padding-top: 8px;
}

.chart-plot::before {
  content: "";
  position: absolute;
  inset: 8px 0 26px;
  background:
    linear-gradient(to bottom, rgba(16, 32, 39, 0.08) 1px, transparent 1px) 0 0 / 100% 25%;
  pointer-events: none;
}

.chart-plot::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(26px + 42%);
  border-top: 2px dashed rgba(82, 102, 111, 0.22);
  pointer-events: none;
}

.bar-item {
  display: grid;
  grid-template-rows: 18px 1fr auto;
  gap: 8px;
  flex: 1;
  min-width: 36px;
  height: 218px;
  align-items: end;
  position: relative;
  z-index: 1;
}

.bar-value {
  align-self: start;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
  opacity: 0.82;
}

.bar-fill {
  width: 100%;
  min-height: 18px;
  background: linear-gradient(180deg, #2e8f70, #b8e4d3);
  border-radius: 7px 7px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transition: filter 180ms ease, transform 180ms ease;
}

.bar-item:hover .bar-fill {
  filter: saturate(1.12);
  transform: translateY(-2px);
}

.bar-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-align: center;
}

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

.source-row {
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.source-row:hover {
  background: #f8fbfa;
  border-color: var(--line);
  transform: translateX(2px);
}

.source-row header {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.source-track {
  overflow: hidden;
  height: 13px;
  background: #edf3f1;
  border-radius: 999px;
}

.source-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #86d0b6);
  border-radius: inherit;
  box-shadow: 0 4px 14px rgba(23, 107, 82, 0.18);
}

.conversion-chart {
  min-height: 240px;
  padding: 12px;
  background:
    linear-gradient(to bottom, rgba(16, 32, 39, 0.08) 1px, transparent 1px) 0 18px / 100% 25%,
    #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.conversion-chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 210px;
}

.conversion-area {
  fill: rgba(46, 143, 112, 0.16);
}

.conversion-line {
  fill: none;
  stroke: #176b52;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.conversion-point {
  fill: #ffffff;
  stroke: #176b52;
  stroke-width: 3;
}

.conversion-label {
  fill: #52666f;
  font-size: 11px;
  font-weight: 800;
}

.conversion-value {
  fill: #102027;
  font-size: 11px;
  font-weight: 900;
}

.table-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  min-width: 0;
}

.table-count {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 5px 8px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.table-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(150px, 0.45fr);
  gap: 8px;
  min-width: min(100%, 690px);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: #f8fbfa;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  color: var(--ink);
  font-size: 0.91rem;
  font-weight: 760;
}

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

.status-badge {
  display: inline-flex;
  padding: 5px 8px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.status-badge.risk {
  color: #8f2e28;
  background: #fff1ef;
}

.status-badge.won {
  color: #0f4c3b;
  background: #dff1ea;
}

.table-empty {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  background: #f8fbfa;
  border-radius: 8px;
  font-weight: 850;
}

.admin-card {
  padding: clamp(18px, 3vw, 22px);
}

.compact-heading {
  margin-bottom: 18px;
}

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

.scope-grid-live {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.package-card-live {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(22px, 4vw, 34px);
}

.package-card-live h2 {
  font-size: clamp(2rem, 4.2vw, 4rem);
}

.package-list-live {
  padding: 18px;
  color: #ffffff;
  background: #102027;
  border-radius: 8px;
}

.snippet-copy-card {
  display: grid;
  gap: 16px;
  max-width: 1000px;
  padding: clamp(18px, 3vw, 24px);
}

.snippet-copy-card p {
  margin: 0;
  font-size: 1.03rem;
}

.snippet-copy-card button {
  width: fit-content;
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #102027;
  color: #ffffff;
}

.final-cta > div:first-child {
  max-width: 760px;
}

.final-cta h2 {
  color: #ffffff;
}

.final-cta p {
  color: #dbe7e4;
}

.final-cta .button.secondary {
  color: #dff1ea;
  background: transparent;
  border-color: rgba(223, 241, 234, 0.4);
}

.dashboard-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

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

@media (max-width: 1040px) {
  .dashboard-hero,
  .login-layout,
  .package-card-live {
    grid-template-columns: 1fr;
  }

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

  .app-sidebar {
    display: flex;
    min-height: 0;
    overflow-x: auto;
  }

  .app-sidebar strong,
  .app-sidebar span {
    white-space: nowrap;
  }

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

@media (max-width: 860px) {
  .dashboard-hero {
    min-height: auto;
  }

  .pain-grid,
  .proof-grid-live {
    grid-template-columns: 1fr;
  }

  .app-topbar,
  .table-toolbar,
  .final-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-controls {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .dashboard-header .brand {
    min-width: 0;
  }

  .dashboard-hero h1 {
    font-size: clamp(2.25rem, 12vw, 3.35rem);
  }

  .mini-metrics,
  .metric-grid,
  .settings-grid,
  .scope-grid-live,
  .table-controls {
    grid-template-columns: 1fr;
  }

  .mini-chart,
  .bar-chart-live {
    overflow-x: auto;
  }

  .bar-chart-live {
    justify-content: flex-start;
  }

  .bar-item {
    min-width: 48px;
  }

  .login-actions,
  .login-actions .button,
  .snippet-copy-card button {
    width: 100%;
  }
}
