.dashboard {
  container: overview / inline-size;
  --dash-ink: var(--graphite-ink, #f3f4f4);
  --dash-muted: var(--graphite-muted, #b0b3b8);
  --dash-line: var(--graphite-hairline, #ffffff1a);
  --dash-stage: var(--graphite-stage, #202124);
  --dash-panel: var(--graphite-panel, #25272a);
  --dash-ease: var(--graphite-ease, cubic-bezier(.22, 1, .36, 1));
  color: var(--dash-ink);
}
.dash-header { margin: 5px 0 clamp(20px, 3.5cqw, 38px); }
.dash-kicker { color: var(--dash-muted); font: 650 10px/1.35 'DM Sans', sans-serif; letter-spacing: .13em; }
.dash-header h1 {
  margin: 0;
  font-size: clamp(32px, 5cqw, 58px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -.065em;
  overflow-wrap: anywhere;
}
.dash-panel-head p { color: var(--dash-muted); font-size: 13px; line-height: 1.55; }

.dash-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(215px, 1fr);
  gap: 14px;
}
.dash-hero, .dash-next, .dash-panel, .dash-metric {
  min-width: 0;
  border: 1px solid var(--dash-line);
  border-radius: 16px;
  background: var(--dash-stage);
}
.dash-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, .78fr);
  align-items: center;
  gap: clamp(18px, 3.6cqw, 35px);
  min-height: 265px;
  padding: clamp(22px, 3.8cqw, 40px);
  overflow: hidden;
  background: linear-gradient(125deg, var(--dash-stage) 34%, var(--dash-panel));
}
.dash-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: '';
  pointer-events: none;
  background:
    linear-gradient(#ffffff12 1px, transparent 1px),
    linear-gradient(90deg, #ffffff12 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at 81% 48%, #000 4%, transparent 67%);
}
.dash-hero h2 {
  margin: 0 0 13px;
  font-size: clamp(32px, 5cqw, 57px);
  line-height: 1;
  letter-spacing: -.063em;
  font-weight: 700;
}
.dash-hero-copy > p { max-width: 310px; color: var(--dash-muted); font-size: 13px; line-height: 1.6; }
.dash-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 13px; margin-top: 20px; }
.dash-hero-actions .btn { min-height: 41px; padding: 8px 13px; }
.dash-hero-actions .dash-link { min-height: 40px; padding: 8px 3px; background: transparent; color: var(--dash-ink); }
.dash-link:hover { color: #fff; }
.dash-link .icon, .dash-next-action .icon, .dash-inline-action .icon { width: 15px; height: 15px; }

.dash-bot-card {
  position: relative;
  align-self: center;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--graphite-line, #414349);
  border-radius: 13px;
  background: #2a2c2f;
  box-shadow: 0 15px 27px #090a0d4a;
}
.dash-bot-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--dash-muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .10em;
}
.dash-bot-mark { color: var(--dash-muted); }
.dash-bot-mark .icon { width: 15px; height: 15px; }
.dash-bot-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  margin: 16px 0 11px;
  border: 1px solid #ffffff20;
  border-radius: 11px;
  background: var(--graphite-raised, #2d2f33);
  color: var(--graphite-accent, #dfe2e6);
}
.dash-bot-icon .icon { width: 22px; height: 22px; }
.dash-bot-card > strong, .dash-bot-card > p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-bot-card > strong { font-size: 14px; }
.dash-bot-card > p { margin-top: 4px; color: var(--dash-muted); font-size: 11px; }
.dash-connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  margin-top: 14px;
  padding: 3px 7px;
  border: 1px solid var(--dash-line);
  border-radius: 999px;
  background: #ffffff06;
  color: var(--dash-ink);
  font-size: 10px;
  font-weight: 700;
}
.dash-connection i, .dash-status-value i { display: block; flex: none; width: 6px; height: 6px; border-radius: 50%; background: #a7aab1; }
.dash-connection.is-connected { color: #b1e6cc; border-color: #81d8aa32; background: #81d8aa12; }
.dash-connection.is-connected i, .dash-status-value i.is-connected { background: #87deb9; }

.dash-next {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(19px, 2.6cqw, 27px);
}
.dash-section-top { display: flex; gap: 8px; width: 100%; }
.dash-next-icon, .dash-flow-icon, .dash-shortcut-icon, .dash-empty > span {
  display: grid;
  place-items: center;
  flex: none;
  width: 37px;
  height: 37px;
  border: 1px solid var(--dash-line);
  border-radius: 9px;
  background: var(--dash-panel);
  color: var(--graphite-accent, #dfe2e6);
}
.dash-next-icon { width: 43px; height: 43px; margin: 23px 0 13px; border-radius: 12px; }
.dash-next h2, .dash-panel h2 { font-size: 21px; line-height: 1.2; font-weight: 700; letter-spacing: -.041em; }
.dash-next > p { max-width: 280px; margin: 8px 0 17px; color: var(--dash-muted); font-size: 13px; line-height: 1.55; }
.dash-next-action, .dash-inline-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0;
  background: none;
  color: var(--dash-ink);
  font-size: 12px;
  font-weight: 750;
}
.dash-next-action { margin-top: auto; }
.dash-next-action:hover, .dash-inline-action:hover { color: #fff; }

.dash-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.dash-metric {
  padding: 15px 17px;
  border-radius: 12px;
}
.dash-metric-top { display: flex; justify-content: space-between; align-items: center; gap: 5px; color: var(--dash-muted); font-size: 10px; font-weight: 750; letter-spacing: .07em; }
.dash-metric-top .icon { flex: none; width: 16px; height: 16px; }
.dash-metric-value { margin-top: 11px; font: 800 29px/1.1 Manrope, sans-serif; letter-spacing: -.052em; font-variant-numeric: tabular-nums; }
.dash-metric-value small { margin-left: 6px; color: var(--dash-muted); font: 500 11px 'DM Sans', sans-serif; letter-spacing: 0; }
.dash-metric > p { margin-top: 6px; color: var(--dash-muted); font-size: 11px; line-height: 1.4; }
.dash-status-value { display: flex; align-items: center; gap: 7px; min-height: 31px; font: 750 16px/1.22 Manrope, sans-serif; letter-spacing: -.025em; }

.dash-bottom-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); gap: 14px; }
.dash-panel { padding: clamp(17px, 2.4cqw, 26px); }
.dash-panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 12px; }
.dash-panel-head h2 { margin: 0 0 4px; }
.dash-flow-list { display: grid; gap: 2px; margin-top: 15px; }
.dash-flow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 0;
  border-top: 1px solid var(--dash-line);
}
.dash-flow-icon .icon, .dash-shortcut-icon .icon { width: 17px; height: 17px; }
.dash-flow-row > div { flex: 1; min-width: 0; }
.dash-flow-row strong, .dash-flow-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-flow-row strong { font-size: 13px; }
.dash-flow-row small { margin-top: 4px; color: var(--dash-muted); font-size: 11px; }
.dash-flow-kind {
  padding: 3px 6px;
  border: 1px solid var(--dash-line);
  border-radius: 99px;
  background: var(--dash-panel);
  color: var(--dash-muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .06em;
}
.dash-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  padding: 14px;
  border: 1px dashed var(--graphite-line, #414349);
  border-radius: 10px;
  background: #ffffff03;
}
.dash-empty > div { flex: 1; min-width: 135px; }
.dash-empty strong { font-size: 13px; }
.dash-empty p { margin-top: 4px; color: var(--dash-muted); font-size: 11px; line-height: 1.45; }
.dash-shortcuts { display: flex; flex-direction: column; gap: 3px; }
.dash-shortcuts .dash-panel-head { margin-bottom: 10px; }
.dash-shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  color: inherit;
  text-align: left;
  transition: background .2s, border-color .2s;
}
.dash-shortcut:hover, .dash-shortcut:focus-visible { background: var(--dash-panel); border-color: var(--dash-line); }
.dash-shortcut > span:nth-child(2) { flex: 1; min-width: 0; }
.dash-shortcut strong, .dash-shortcut small { display: block; }
.dash-shortcut strong { font-size: 13px; }
.dash-shortcut small { margin-top: 4px; color: var(--dash-muted); font-size: 11px; line-height: 1.45; }
.dash-shortcut > .icon { flex: none; width: 15px; height: 15px; color: var(--dash-muted); }

@media (prefers-reduced-motion: no-preference) {
  .dash-shortcut > .icon, .dash-next-action > .icon, .dash-inline-action > .icon { transition: transform .24s var(--dash-ease); }
  .dash-shortcut:hover > .icon, .dash-next-action:hover > .icon, .dash-inline-action:hover > .icon { transform: translateX(3px); }
}

@container overview (max-width: 760px) {
  .dash-main-grid { grid-template-columns: 1fr; gap: 12px; }
  .dash-hero { grid-template-columns: minmax(0, 1fr) minmax(155px, .64fr); min-height: 251px; }
  .dash-next-icon { margin: 14px 0 10px; }
  .dash-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container overview (max-width: 540px) {
  .dash-bottom-grid { grid-template-columns: 1fr; gap: 12px; }
}
@container overview (max-width: 410px) {
  .dash-header { margin-bottom: 18px; }
  .dash-hero { grid-template-columns: 1fr; gap: 16px; min-height: 0; padding: 20px; }
  .dash-hero h2 { font-size: 39px; }
  .dash-hero-actions { margin-top: 13px; }
  .dash-metrics { gap: 8px; margin: 12px 0; }
  .dash-metric { padding: 11px; }
  .dash-metric-value { font-size: 24px; }
  .dash-status-value { font-size: 14px; }
}
