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

:root {
  --ink: #18212f;
  --ink-soft: #394559;
  --muted: #8390a4;
  --muted-2: #a7b0bf;
  --line: #e8ebf1;
  --line-strong: #dfe4ec;
  --canvas: #f6f8fb;
  --panel: #ffffff;
  --sidebar: #111827;
  --sidebar-muted: #8893a6;
  --violet: #6f5be7;
  --violet-dark: #5642ca;
  --violet-pale: #f0edff;
  --teal: #19a88d;
  --teal-pale: #e7f8f3;
  --orange: #e98348;
  --orange-pale: #fff1e8;
  --blue: #4384e9;
  --blue-pale: #eaf2ff;
  --red: #e86c78;
  --red-pale: #ffedef;
  --shadow: 0 14px 40px rgba(25, 36, 58, 0.07);
  --shadow-small: 0 5px 15px rgba(25, 36, 58, 0.06);
  font-family: "DM Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-height: 100vh;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(111, 91, 231, 0.22);
  outline-offset: 2px;
}

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

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex: 0 0 252px;
  flex-direction: column;
  width: 252px;
  height: 100vh;
  padding: 24px 15px 17px;
  color: #fff;
  background:
    radial-gradient(circle at 0% 10%, rgba(111, 91, 231, 0.22), transparent 28%),
    var(--sidebar);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, #8474ff 0%, #5945d4 100%);
  border-radius: 10px 10px 10px 3px;
  box-shadow: 0 7px 16px rgba(92, 70, 217, 0.32);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
  width: 11px;
  height: 4px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 3px;
  transform: rotate(-35deg);
}

.brand-mark::before {
  top: 10px;
  left: 9px;
}

.brand-mark::after {
  right: 8px;
  bottom: 9px;
  background: rgba(211, 205, 255, 0.8);
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.1;
}

.brand-wordmark strong {
  font-size: 17px;
  letter-spacing: -0.03em;
}

.brand-wordmark span {
  color: #8d98aa;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.workspace-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin: 32px 4px 22px;
  padding: 9px 11px;
  color: #dbe1ed;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 11px;
}

.workspace-name {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.workspace-name > span:last-child {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-dot {
  width: 8px;
  height: 8px;
  flex: none;
  background: #43c8a5;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(67, 200, 165, 0.11);
}

.workspace-switcher .icon {
  color: #758096;
}

.nav-section {
  margin-bottom: 22px;
}

.nav-section-label {
  padding: 0 12px 8px;
  color: #68748a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 3px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  color: var(--sidebar-muted);
  font-size: 13px;
  text-align: left;
  background: transparent;
  border-radius: 9px;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  color: #e3e7f1;
  background: rgba(255, 255, 255, 0.065);
  transform: translateX(1px);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(111, 91, 231, 0.29), rgba(111, 91, 231, 0.13));
  box-shadow: inset 0 0 0 1px rgba(141, 126, 245, 0.14);
}

.nav-item.active::before {
  position: absolute;
  left: -15px;
  width: 3px;
  height: 20px;
  content: "";
  background: #8e80fb;
  border-radius: 0 3px 3px 0;
}

.nav-item .icon {
  width: 17px;
  color: #8792a7;
}

.nav-item.active .icon {
  color: #b8afff;
}

.nav-item-label {
  flex: 1;
}

.nav-badge {
  min-width: 21px;
  padding: 2px 6px;
  color: #bdb6ff;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  text-align: center;
  background: rgba(111, 91, 231, 0.23);
  border-radius: 20px;
}

.sidebar-spacer {
  flex: 1;
  min-height: 22px;
}

.agent-status {
  margin: 0 3px 13px;
  padding: 13px 13px 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
}

.agent-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #d8deea;
  font-size: 11px;
  font-weight: 600;
}

.status-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #59d5af;
  font-size: 10px;
  font-weight: 600;
}

.status-live::before {
  width: 5px;
  height: 5px;
  content: "";
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(89, 213, 175, 0.12);
}

.agent-status p {
  margin: 0 0 10px;
  color: #7f8a9f;
  font-size: 10px;
  line-height: 1.6;
}

.usage-bar {
  height: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 10px;
}

.usage-bar > span {
  display: block;
  width: 67%;
  height: 100%;
  background: linear-gradient(90deg, #7462ed, #9b91ff);
  border-radius: inherit;
}

.usage-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: #69758a;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.sidebar-user .avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.sidebar-user-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.sidebar-user-copy strong {
  overflow: hidden;
  color: #e0e5ee;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy span {
  color: #727e92;
  font-size: 9px;
}

/* Main shell and top bar */
.main-shell {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}

.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 36px;
  background: rgba(246, 248, 251, 0.9);
  border-bottom: 1px solid rgba(232, 235, 241, 0.8);
  backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
}

.topbar-left {
  min-width: 0;
  gap: 13px;
}

.crumb {
  color: #9aa4b4;
  font-size: 12px;
  white-space: nowrap;
}

.crumb-divider {
  color: #c5cbd4;
}

.crumb-current {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search {
  display: flex;
  align-items: center;
  width: 230px;
  height: 36px;
  gap: 8px;
  padding: 0 9px 0 11px;
  color: #98a2b2;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  transition: width 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.global-search:focus-within {
  width: 285px;
  border-color: #c9c0ff;
  box-shadow: 0 0 0 3px rgba(111, 91, 231, 0.09);
}

.global-search input {
  min-width: 0;
  flex: 1;
  color: var(--ink);
  font-size: 11px;
  background: transparent;
  border: 0;
  outline: 0;
}

.global-search input::placeholder {
  color: #abb4c1;
}

kbd {
  padding: 2px 5px;
  color: #9da7b6;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  background: #f5f6f9;
  border: 1px solid #e6e9ee;
  border-radius: 4px;
}

.topbar-right {
  gap: 17px;
}

.topbar-divider {
  height: 24px;
  border-left: 1px solid var(--line-strong);
}

.icon-button {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #8792a4;
  background: transparent;
  border-radius: 9px;
  transition: color 160ms ease, background 160ms ease;
}

.icon-button:hover {
  color: var(--violet);
  background: var(--violet-pale);
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 5px;
  height: 5px;
  background: var(--red);
  border: 1.5px solid var(--canvas);
  border-radius: 50%;
}

.avatar {
  display: inline-grid;
  width: 31px;
  height: 31px;
  flex: none;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(140deg, #7f70e8, #4e3dbd);
  border-radius: 10px;
}

.avatar.amber {
  background: linear-gradient(140deg, #efa36f, #d46d3e);
}

.avatar.blue {
  background: linear-gradient(140deg, #78a8f0, #3f73cf);
}

.avatar.teal {
  background: linear-gradient(140deg, #67d3be, #15977e);
}

.avatar.pink {
  background: linear-gradient(140deg, #e895af, #be5378);
}

/* Shared page components */
.content {
  width: 100%;
  max-width: 1510px;
  padding: 31px 36px 54px;
  margin: 0 auto;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--violet);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow .eyebrow-dot {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}

.page-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 2.3vw, 31px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.page-heading p {
  max-width: 600px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.heading-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  gap: 7px;
  padding: 0 13px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(28, 39, 58, 0.02);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease,
    transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  border-color: #c9d0dc;
  box-shadow: var(--shadow-small);
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: var(--violet);
  border-color: var(--violet);
  box-shadow: 0 7px 16px rgba(111, 91, 231, 0.2);
}

.button.primary:hover {
  background: var(--violet-dark);
  border-color: var(--violet-dark);
  box-shadow: 0 9px 20px rgba(111, 91, 231, 0.28);
}

.button.ghost {
  color: var(--violet);
  background: var(--violet-pale);
  border-color: transparent;
  box-shadow: none;
}

.button.ghost:hover {
  color: var(--violet-dark);
  background: #e8e3ff;
}

.button.small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 10px;
  border-radius: 7px;
}

.button .icon {
  width: 14px;
  height: 14px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 4px 17px rgba(33, 44, 68, 0.025);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 20px 15px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.panel-title .icon {
  color: var(--violet);
}

.panel-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
  color: var(--violet);
  font-size: 10px;
  font-weight: 600;
  background: transparent;
}

.text-button:hover {
  color: var(--violet-dark);
}

.text-button .icon {
  width: 12px;
}

.soft-divider {
  height: 1px;
  background: var(--line);
}

.mono {
  font-family: "DM Mono", monospace;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  color: #758095;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  background: #f5f7fa;
  border-radius: 5px;
}

.pill.violet {
  color: var(--violet);
  background: var(--violet-pale);
}

.pill.teal {
  color: #148d78;
  background: var(--teal-pale);
}

.pill.orange {
  color: #bd6637;
  background: var(--orange-pale);
}

.pill.blue {
  color: #3f6ec1;
  background: var(--blue-pale);
}

.pill.red {
  color: #cf5866;
  background: var(--red-pale);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #718096;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.status-chip::before {
  width: 6px;
  height: 6px;
  content: "";
  background: #b8c0cc;
  border-radius: 50%;
}

.status-chip.active {
  color: #168d75;
}

.status-chip.active::before {
  background: #32b693;
  box-shadow: 0 0 0 3px rgba(50, 182, 147, 0.11);
}

.status-chip.pending {
  color: #b97843;
}

.status-chip.pending::before {
  background: #e39a5d;
}

.status-chip.danger {
  color: #cf5f6c;
}

.status-chip.danger::before {
  background: #e57582;
}

.avatar-group {
  display: flex;
  align-items: center;
}

.avatar-group .avatar {
  width: 26px;
  height: 26px;
  margin-left: -7px;
  font-size: 9px;
  border: 2px solid #fff;
}

.avatar-group .avatar:first-child {
  margin-left: 0;
}

.avatar-more {
  display: inline-grid;
  width: 26px;
  height: 26px;
  margin-left: -7px;
  place-items: center;
  color: #7f8999;
  font-size: 9px;
  font-weight: 600;
  background: #edf0f5;
  border: 2px solid #fff;
  border-radius: 50%;
}

/* Dashboard */
.dashboard-hero {
  position: relative;
  display: flex;
  min-height: 206px;
  justify-content: space-between;
  gap: 30px;
  padding: 28px 31px;
  margin-bottom: 18px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 77% 42%, rgba(150, 137, 255, 0.34), transparent 23%),
    radial-gradient(circle at 99% 0%, rgba(61, 194, 175, 0.21), transparent 25%),
    linear-gradient(120deg, #292b65 0%, #282455 53%, #1a254d 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(31, 36, 91, 0.17);
}

.dashboard-hero::after {
  position: absolute;
  right: 0;
  bottom: -120px;
  width: 470px;
  height: 270px;
  content: "";
  background: linear-gradient(130deg, transparent, rgba(255, 255, 255, 0.045));
  border-radius: 50%;
  transform: rotate(-18deg);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 485px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  color: #ada7ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-kicker .icon {
  width: 13px;
}

.hero-copy h2 {
  max-width: 420px;
  margin: 0;
  font-size: clamp(21px, 2.3vw, 29px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.35;
}

.hero-copy p {
  max-width: 440px;
  margin: 9px 0 21px;
  color: #b4b9d4;
  font-size: 11px;
  line-height: 1.75;
}

.hero-copy .button.primary {
  color: #2e2a61;
  background: #fff;
  border-color: #fff;
  box-shadow: 0 7px 18px rgba(18, 17, 66, 0.17);
}

.hero-copy .button.primary:hover {
  color: #1f1a4b;
  background: #f0eeff;
  border-color: #f0eeff;
}

.hero-graphic {
  position: relative;
  z-index: 1;
  width: 310px;
  flex: none;
}

.network-orbit {
  position: absolute;
  top: 15px;
  right: 68px;
  width: 148px;
  height: 148px;
  border: 1px solid rgba(175, 169, 255, 0.24);
  border-radius: 50%;
}

.network-orbit::before,
.network-orbit::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(175, 169, 255, 0.17);
  border-radius: 50%;
}

.network-orbit::before {
  inset: 19px;
}

.network-orbit::after {
  inset: 42px;
  border-color: rgba(106, 207, 189, 0.31);
}

.orbit-line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 170px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(175, 169, 255, 0.34), transparent);
  transform: translate(-50%, -50%) rotate(34deg);
}

.orbit-line.two {
  transform: translate(-50%, -50%) rotate(-48deg);
}

.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #b5adff, #7567ea);
  border: 5px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(141, 125, 255, 0.72);
  transform: translate(-50%, -50%);
}

.orbit-core .icon {
  width: 14px;
}

.orbit-node {
  position: absolute;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  color: #c6c1ff;
  font-size: 8px;
  font-weight: 700;
  background: #363270;
  border: 1px solid rgba(194, 187, 255, 0.52);
  border-radius: 50%;
}

.orbit-node.one {
  top: 7px;
  right: 18px;
}

.orbit-node.two {
  bottom: 12px;
  left: 12px;
  color: #9ae7d7;
  border-color: rgba(89, 213, 175, 0.56);
}

.orbit-node.three {
  top: 58px;
  left: -10px;
}

.hero-data-card {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  color: #d9d7ff;
  background: rgba(11, 17, 48, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(6px);
}

.hero-data-card .icon {
  color: #69d8bd;
}

.hero-data-card strong {
  display: block;
  font-family: "DM Mono", monospace;
  font-size: 13px;
}

.hero-data-card span {
  color: #a7a9c6;
  font-size: 9px;
}

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

.stat-card {
  position: relative;
  min-height: 118px;
  padding: 16px 17px 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.stat-card::after {
  position: absolute;
  right: -22px;
  bottom: -40px;
  width: 104px;
  height: 75px;
  content: "";
  border: 1px solid rgba(111, 91, 231, 0.08);
  border-radius: 50%;
}

.stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.stat-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.stat-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--violet);
  background: var(--violet-pale);
  border-radius: 8px;
}

.stat-card:nth-child(2) .stat-icon {
  color: var(--teal);
  background: var(--teal-pale);
}

.stat-card:nth-child(3) .stat-icon {
  color: var(--orange);
  background: var(--orange-pale);
}

.stat-card:nth-child(4) .stat-icon {
  color: var(--blue);
  background: var(--blue-pale);
}

.stat-icon .icon {
  width: 15px;
}

.stat-value {
  margin: 10px 0 6px;
  color: var(--ink);
  font-family: "DM Mono", monospace;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.08em;
}

.stat-value small {
  margin-left: 3px;
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #20a182;
  font-size: 9px;
  font-weight: 600;
}

.stat-trend.down {
  color: var(--red);
}

.stat-trend .icon {
  width: 11px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
  gap: 18px;
  margin-bottom: 18px;
}

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

.recommended-table th {
  padding: 0 20px 10px;
  color: #a0a8b5;
  font-size: 9px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.recommended-table td {
  padding: 13px 20px;
  color: #637087;
  font-size: 10px;
  border-bottom: 1px solid #f0f2f5;
}

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

.media-cell {
  display: flex;
  align-items: center;
  min-width: 165px;
  gap: 9px;
}

.media-logo {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: none;
  place-items: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  background: linear-gradient(145deg, #8071ea, #5542bf);
  border-radius: 8px;
}

.media-logo.orange {
  background: linear-gradient(145deg, #f1ad76, #d46d3e);
}

.media-logo.blue {
  background: linear-gradient(145deg, #75a9f2, #3e71c9);
}

.media-logo.teal {
  background: linear-gradient(145deg, #70d8c3, #159679);
}

.media-cell-copy {
  min-width: 0;
}

.media-cell-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-cell-copy span {
  display: block;
  margin-top: 3px;
  color: #a2aaba;
  font-size: 9px;
}

.score-number {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  color: var(--violet);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  font-weight: 500;
}

.score-number small {
  color: #a9b0bf;
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
}

.task-list {
  padding: 0 20px 16px;
}

.task-item {
  position: relative;
  display: flex;
  gap: 11px;
  padding: 11px 0 13px 14px;
  border-bottom: 1px solid #f0f2f5;
}

.task-item:last-child {
  border-bottom: 0;
}

.task-item::before {
  position: absolute;
  top: 16px;
  left: 0;
  width: 6px;
  height: 6px;
  content: "";
  background: #b4bdca;
  border-radius: 50%;
}

.task-item.done::before {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(25, 168, 141, 0.11);
}

.task-item.focus::before {
  background: var(--violet);
  box-shadow: 0 0 0 3px rgba(111, 91, 231, 0.12);
}

.task-copy {
  min-width: 0;
  flex: 1;
}

.task-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-copy span {
  display: block;
  margin-top: 4px;
  color: #9ba5b3;
  font-size: 9px;
  line-height: 1.5;
}

.task-time {
  padding-top: 2px;
  color: #a3adba;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  white-space: nowrap;
}

.activity-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  overflow: hidden;
}

.activity-card {
  display: flex;
  min-height: 92px;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  border-right: 1px solid var(--line);
}

.activity-card:last-child {
  border-right: 0;
}

.activity-card .activity-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: none;
  place-items: center;
  color: var(--violet);
  background: var(--violet-pale);
  border-radius: 9px;
}

.activity-card:nth-child(2) .activity-icon {
  color: var(--orange);
  background: var(--orange-pale);
}

.activity-card:nth-child(3) .activity-icon {
  color: var(--teal);
  background: var(--teal-pale);
}

.activity-card .icon {
  width: 15px;
}

.activity-card-copy {
  min-width: 0;
}

.activity-card-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-card-copy span {
  display: block;
  margin-top: 4px;
  color: #9ca6b4;
  font-size: 9px;
}

/* Discovery and filters */
.command-search {
  display: flex;
  align-items: center;
  min-height: 49px;
  gap: 12px;
  padding: 0 13px 0 16px;
  margin-bottom: 13px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  box-shadow: var(--shadow-small);
}

.command-search > .icon {
  color: var(--violet);
}

.command-search input {
  min-width: 0;
  flex: 1;
  color: var(--ink);
  font-size: 12px;
  background: transparent;
  border: 0;
  outline: 0;
}

.command-search input::placeholder {
  color: #abb4c1;
}

.filter-row {
  display: flex;
  align-items: center;
  min-height: 34px;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 17px;
}

.filter-label {
  margin-right: 4px;
  color: #a1aab8;
  font-size: 10px;
}

.filter-chip {
  padding: 6px 10px;
  color: #7d8898;
  font-size: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: color 160ms ease, border 160ms ease, background 160ms ease;
}

.filter-chip:hover {
  color: var(--violet);
  border-color: #cfc8ff;
}

.filter-chip.active {
  color: var(--violet);
  font-weight: 600;
  background: var(--violet-pale);
  border-color: #dcd7ff;
}

.discovery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.72fr);
  align-items: start;
  gap: 18px;
}

.discovery-list {
  overflow: hidden;
}

.discovery-list .panel-head {
  padding-bottom: 17px;
}

.result-count {
  color: #9aa5b3;
  font-size: 9px;
  font-weight: 500;
}

.discovery-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) minmax(100px, 0.6fr) minmax(135px, 0.85fr) auto;
  align-items: center;
  min-height: 91px;
  gap: 16px;
  padding: 13px 20px;
  border-top: 1px solid #f0f2f5;
  transition: background 160ms ease;
}

.discovery-row:hover {
  background: #fbfcfe;
}

.empty-state {
  display: grid;
  min-height: 225px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 24px;
  color: #a0aab8;
  text-align: center;
}

.empty-state > div {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 3px;
  place-items: center;
  color: #9a8ef2;
  background: var(--violet-pale);
  border-radius: 12px;
}

.empty-state strong {
  color: #6d7a8e;
  font-size: 11px;
}

.empty-state span {
  font-size: 9px;
}

.discovery-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.discovery-main .media-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.discovery-main-copy {
  min-width: 0;
}

.discovery-main-copy h3 {
  margin: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-main-copy p {
  overflow: hidden;
  margin: 4px 0 0;
  color: #99a4b3;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-tags {
  display: flex;
  gap: 5px;
  margin-top: 7px;
}

.discovery-metric-label {
  margin-bottom: 5px;
  color: #a4adba;
  font-size: 9px;
}

.metric-value {
  color: var(--ink-soft);
  font-family: "DM Mono", monospace;
  font-size: 12px;
}

.metric-value small {
  color: #a4adba;
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
}

.score-ring {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  background: conic-gradient(var(--score-color, var(--violet)) var(--score-angle), #edf0f4 0deg);
  border-radius: 50%;
}

.score-ring::after {
  display: grid;
  width: 32px;
  height: 32px;
  content: attr(data-score);
  place-items: center;
  color: var(--violet);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  background: #fff;
  border-radius: 50%;
}

.discovery-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mini-icon-button {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: #9aa5b4;
  background: transparent;
  border-radius: 6px;
}

.mini-icon-button:hover {
  color: var(--violet);
  background: var(--violet-pale);
}

.mini-icon-button .icon {
  width: 14px;
}

.signal-panel {
  overflow: hidden;
}

.signal-body {
  padding: 0 20px 20px;
}

.signal-score {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 15px;
  margin-top: 1px;
  background: linear-gradient(135deg, #f5f2ff, #fbfbff);
  border: 1px solid #ece8ff;
  border-radius: 10px;
}

.signal-score-copy span {
  display: block;
  color: #9a92ca;
  font-size: 9px;
}

.signal-score-copy strong {
  display: block;
  margin-top: 4px;
  color: var(--violet);
  font-family: "DM Mono", monospace;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.08em;
}

.signal-score-copy small {
  margin-left: 3px;
  color: #9d96ca;
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  letter-spacing: 0;
}

.signal-spark {
  align-self: center;
  width: 90px;
  height: 39px;
}

.signal-spark polyline {
  fill: none;
  stroke: var(--violet);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.signal-spark path {
  fill: url(#spark-fill);
  opacity: 0.7;
}

.signal-list {
  display: grid;
  gap: 14px;
  padding-top: 19px;
}

.signal-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.signal-line-label {
  color: #798699;
  font-size: 10px;
}

.signal-line-value {
  color: var(--ink-soft);
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.signal-progress {
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  background: #eef1f5;
  border-radius: 10px;
}

.signal-progress span {
  display: block;
  height: 100%;
  background: var(--violet);
  border-radius: inherit;
}

.signal-progress.teal span {
  background: var(--teal);
}

.signal-progress.orange span {
  background: var(--orange);
}

.agent-note {
  display: flex;
  gap: 9px;
  padding: 12px;
  margin-top: 18px;
  color: #6f7890;
  font-size: 9px;
  line-height: 1.65;
  background: #fbfaf4;
  border: 1px solid #f2ebd8;
  border-radius: 8px;
}

.agent-note .icon {
  width: 14px;
  flex: none;
  color: #d7a044;
}

/* Media management */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.select-control {
  height: 31px;
  padding: 0 25px 0 9px;
  color: #737f92;
  font-size: 10px;
  background: #f8f9fb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.table-panel {
  overflow: hidden;
}

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

.data-table th {
  padding: 0 20px 11px;
  color: #9ba5b4;
  font-size: 9px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table td {
  padding: 14px 20px;
  color: #69778b;
  font-size: 10px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f2f5;
}

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

.data-table tr:hover td {
  background: #fcfdff;
}

.table-media {
  display: flex;
  min-width: 175px;
  align-items: center;
  gap: 10px;
}

.table-media-copy strong {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.table-media-copy span {
  display: block;
  margin-top: 3px;
  color: #a2aaba;
  font-size: 9px;
}

.trust-meter {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 90px;
}

.trust-meter-bar {
  width: 45px;
  height: 5px;
  overflow: hidden;
  background: #edf0f4;
  border-radius: 10px;
}

.trust-meter-bar span {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

.trust-meter span:last-child {
  color: #607086;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.firewall-level {
  display: flex;
  align-items: center;
  gap: 3px;
}

.firewall-level i {
  display: block;
  width: 4px;
  height: 12px;
  background: #e8ebf0;
  border-radius: 2px;
}

.firewall-level i.on {
  background: var(--orange);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  color: #9da7b5;
  font-size: 9px;
  border-top: 1px solid var(--line);
}

.pagination-buttons {
  display: flex;
  gap: 5px;
}

.pagination-buttons button {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: #8e99a8;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pagination-buttons button:disabled {
  color: #ccd1da;
  cursor: not-allowed;
}

/* Client management */
.client-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.72fr);
  align-items: start;
  gap: 18px;
}

.client-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.client-card {
  padding: 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.client-card:hover {
  border-color: #d8d2ff;
  box-shadow: var(--shadow-small);
  transform: translateY(-2px);
}

.client-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.client-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.client-logo {
  display: grid;
  width: 35px;
  height: 35px;
  flex: none;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  background: #1f62ad;
  border-radius: 9px;
}

.client-logo.green {
  background: #18a37d;
}

.client-logo.orange {
  background: #e88445;
}

.client-logo.black {
  background: #252b38;
}

.client-logo.pink {
  background: #cf5d87;
}

.client-identity-copy {
  min-width: 0;
}

.client-identity-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-identity-copy span {
  display: block;
  margin-top: 3px;
  color: #9da7b4;
  font-size: 9px;
}

.client-card-note {
  min-height: 34px;
  margin: 15px 0 14px;
  color: #7a8797;
  font-size: 10px;
  line-height: 1.6;
}

.client-card-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #f0f2f5;
}

.client-stat-label {
  color: #a1aab8;
  font-size: 8px;
}

.client-stat-value {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-family: "DM Mono", monospace;
  font-size: 13px;
}

.health-score {
  text-align: right;
}

.health-score strong {
  display: block;
  color: var(--teal);
  font-family: "DM Mono", monospace;
  font-size: 15px;
}

.health-score span {
  color: #9da7b4;
  font-size: 8px;
}

.client-side-panel {
  overflow: hidden;
}

.client-side-body {
  padding: 0 20px 20px;
}

.client-funnel {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 60px 1fr 30px;
  align-items: center;
  gap: 9px;
}

.funnel-row > span:first-child {
  color: #8390a2;
  font-size: 9px;
}

.funnel-row > span:last-child {
  color: #647187;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  text-align: right;
}

.funnel-bar {
  height: 9px;
  overflow: hidden;
  background: #f0f2f6;
  border-radius: 4px;
}

.funnel-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7563e9, #a59bff);
  border-radius: inherit;
}

.next-renewal {
  margin-top: 22px;
  padding: 13px;
  background: #f7fbfa;
  border: 1px solid #e3f1ed;
  border-radius: 9px;
}

.next-renewal-label {
  color: #8ba399;
  font-size: 9px;
}

.next-renewal strong {
  display: block;
  margin-top: 6px;
  color: #328e7a;
  font-size: 11px;
}

.next-renewal p {
  margin: 5px 0 0;
  color: #91a9a2;
  font-size: 9px;
  line-height: 1.5;
}

/* Topic matching */
.match-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.72fr);
  align-items: start;
  gap: 18px;
}

.match-command {
  padding: 20px;
  margin-bottom: 16px;
}

.match-command label {
  display: block;
  margin-bottom: 9px;
  color: #6f7c91;
  font-size: 10px;
  font-weight: 600;
}

.match-input-wrap {
  display: flex;
  align-items: center;
  min-height: 45px;
  gap: 9px;
  padding: 0 8px 0 12px;
  background: #fbfbfd;
  border: 1px solid #dedff0;
  border-radius: 9px;
}

.match-input-wrap .icon {
  color: var(--violet);
}

.match-input-wrap input {
  min-width: 0;
  flex: 1;
  color: var(--ink);
  font-size: 12px;
  background: transparent;
  border: 0;
  outline: 0;
}

.suggestion-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.suggestion-label {
  margin-right: 4px;
  color: #a0a9b7;
  font-size: 9px;
}

.suggestion {
  padding: 5px 8px;
  color: #7e899c;
  font-size: 9px;
  background: #f6f7fa;
  border: 1px solid #edf0f4;
  border-radius: 5px;
}

.suggestion:hover {
  color: var(--violet);
  background: var(--violet-pale);
  border-color: #e1dcff;
}

.match-result-list {
  overflow: hidden;
}

.match-result-list .panel-head {
  padding-bottom: 16px;
}

.match-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 76px minmax(150px, 0.9fr) auto;
  align-items: center;
  min-height: 97px;
  gap: 15px;
  padding: 13px 20px;
  border-top: 1px solid #f0f2f5;
}

.match-reason {
  min-width: 0;
}

.match-reason strong {
  display: block;
  color: #617087;
  font-size: 10px;
  font-weight: 600;
}

.match-reason p {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  color: #9ba5b3;
  font-size: 9px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.match-reason .pill {
  margin-top: 6px;
}

.match-score {
  text-align: center;
}

.match-score strong {
  display: block;
  color: var(--violet);
  font-family: "DM Mono", monospace;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.08em;
}

.match-score span {
  color: #a2abb8;
  font-size: 8px;
}

.match-signal-list {
  display: grid;
  gap: 6px;
}

.match-signal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: #8a96a7;
  font-size: 9px;
}

.match-signal b {
  color: #66758a;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 500;
}

.match-side-body {
  padding: 0 20px 20px;
}

.match-side-intro {
  padding: 14px;
  color: #747f92;
  font-size: 10px;
  line-height: 1.7;
  background: linear-gradient(135deg, #f8f6ff, #fcfcff);
  border: 1px solid #eeeaff;
  border-radius: 9px;
}

.match-side-intro strong {
  display: block;
  margin-bottom: 5px;
  color: var(--violet);
  font-size: 11px;
}

.match-weight-list {
  display: grid;
  gap: 14px;
  padding-top: 17px;
}

.match-weight-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: #7f8b9d;
  font-size: 9px;
}

.match-weight-head b {
  color: #65738a;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 500;
}

.match-weight-bar {
  height: 6px;
  overflow: hidden;
  background: #eff1f5;
  border-radius: 5px;
}

.match-weight-bar span {
  display: block;
  height: 100%;
  background: var(--violet);
  border-radius: inherit;
}

.match-weight-bar.teal span {
  background: var(--teal);
}

.match-weight-bar.orange span {
  background: var(--orange);
}

.match-weight-bar.blue span {
  background: var(--blue);
}

/* Performance */
.performance-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 17px;
}

.performance-kpi {
  padding: 16px 17px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.performance-kpi-label {
  color: #929dad;
  font-size: 10px;
}

.performance-kpi-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 10px;
  color: var(--ink);
  font-family: "DM Mono", monospace;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.08em;
}

.performance-kpi-value small {
  color: #9ca6b5;
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  letter-spacing: 0;
}

.performance-kpi-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  color: #9aa5b3;
  font-size: 9px;
}

.performance-kpi-foot strong {
  color: var(--teal);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 500;
}

.performance-kpi:nth-child(3) .performance-kpi-foot strong {
  color: var(--violet);
}

.performance-kpi:nth-child(4) .performance-kpi-foot strong {
  color: var(--orange);
}

.performance-charts {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.72fr);
  gap: 17px;
  margin-bottom: 17px;
}

.chart-panel {
  min-width: 0;
  overflow: hidden;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #8b96a6;
  font-size: 9px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 6px;
  height: 6px;
  background: var(--violet);
  border-radius: 50%;
}

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

.line-chart-wrap {
  padding: 4px 16px 10px;
}

.line-chart {
  display: block;
  width: 100%;
  height: 214px;
}

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

.line-chart .chart-label {
  fill: #acb4bf;
  font-family: "DM Mono", monospace;
  font-size: 8px;
}

.line-chart .area-violet {
  fill: url(#areaViolet);
}

.line-chart .area-teal {
  fill: url(#areaTeal);
}

.line-chart .line-violet {
  fill: none;
  stroke: var(--violet);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.line-chart .line-teal {
  fill: none;
  stroke: var(--teal);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.line-chart .point-violet {
  fill: #fff;
  stroke: var(--violet);
  stroke-width: 2;
}

.channel-list {
  display: grid;
  gap: 15px;
  padding: 0 20px 20px;
}

.channel-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
}

.channel-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--violet);
  background: var(--violet-pale);
  border-radius: 8px;
}

.channel-row:nth-child(2) .channel-icon {
  color: var(--orange);
  background: var(--orange-pale);
}

.channel-row:nth-child(3) .channel-icon {
  color: var(--blue);
  background: var(--blue-pale);
}

.channel-row:nth-child(4) .channel-icon {
  color: var(--teal);
  background: var(--teal-pale);
}

.channel-icon .icon {
  width: 15px;
}

.channel-copy strong {
  color: #67758a;
  font-size: 10px;
  font-weight: 600;
}

.channel-copy span {
  display: block;
  margin-top: 4px;
  color: #a3acb9;
  font-size: 8px;
}

.channel-value {
  color: var(--ink-soft);
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.performance-table-panel {
  overflow: hidden;
}

/* Deals */
.deal-summary {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 17px 20px;
  margin-bottom: 17px;
}

.deal-summary-item {
  display: flex;
  align-items: center;
  gap: 9px;
}

.deal-summary-item + .deal-summary-item {
  padding-left: 25px;
  border-left: 1px solid var(--line);
}

.deal-summary-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  color: var(--violet);
  background: var(--violet-pale);
  border-radius: 8px;
}

.deal-summary-item:nth-child(2) .deal-summary-icon {
  color: var(--orange);
  background: var(--orange-pale);
}

.deal-summary-item:nth-child(3) .deal-summary-icon {
  color: var(--teal);
  background: var(--teal-pale);
}

.deal-summary-icon .icon {
  width: 14px;
}

.deal-summary-copy span {
  display: block;
  color: #9ba5b4;
  font-size: 9px;
}

.deal-summary-copy strong {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-family: "DM Mono", monospace;
  font-size: 15px;
  font-weight: 500;
}

.deal-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(225px, 1fr));
  align-items: start;
  gap: 11px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.deal-column {
  min-width: 225px;
  padding: 10px;
  background: #eef1f5;
  border: 1px solid #e7eaf0;
  border-radius: 11px;
}

.deal-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 3px 10px;
}

.deal-column-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #68758a;
  font-size: 10px;
  font-weight: 700;
}

.deal-column-title i {
  width: 7px;
  height: 7px;
  background: #a1acba;
  border-radius: 50%;
}

.deal-column:nth-child(2) .deal-column-title i {
  background: var(--violet);
}

.deal-column:nth-child(3) .deal-column-title i {
  background: var(--orange);
}

.deal-column:nth-child(4) .deal-column-title i {
  background: var(--teal);
}

.deal-column-count {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #8792a2;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  background: #e4e8ef;
  border-radius: 5px;
}

.deal-list {
  display: grid;
  min-height: 110px;
  align-content: start;
  gap: 8px;
}

.deal-card {
  padding: 13px;
  background: #fff;
  border: 1px solid #e8ebf0;
  border-radius: 9px;
  box-shadow: 0 3px 8px rgba(33, 44, 68, 0.035);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.deal-card:hover {
  box-shadow: 0 7px 15px rgba(33, 44, 68, 0.09);
  transform: translateY(-2px);
}

.deal-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.deal-card-top h3 {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.deal-more {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #a6afbc;
  background: transparent;
  border-radius: 5px;
}

.deal-more:hover {
  color: var(--violet);
  background: var(--violet-pale);
}

.deal-card-client {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: #9ba5b4;
  font-size: 9px;
}

.deal-card-client .tiny-avatar {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: #fff;
  font-size: 7px;
  font-weight: 700;
  background: #5986c5;
  border-radius: 5px;
}

.deal-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 11px;
  margin-top: 11px;
  border-top: 1px solid #f0f2f5;
}

.deal-card-meta strong {
  color: #5f6e84;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
}

.deal-card-meta span {
  color: #a1aab7;
  font-size: 8px;
}

.deal-empty {
  display: grid;
  min-height: 92px;
  place-items: center;
  padding: 18px;
  color: #a3adba;
  font-size: 9px;
  border: 1px dashed #d7dce4;
  border-radius: 8px;
}

/* Modal and toast */
.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  padding: 22px;
  place-items: center;
  background: rgba(14, 20, 34, 0.48);
  backdrop-filter: blur(4px);
}

.modal-card {
  width: min(100%, 480px);
  max-height: calc(100vh - 44px);
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 15px;
  box-shadow: 0 22px 70px rgba(10, 18, 38, 0.25);
  animation: modal-in 180ms ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 21px 22px 17px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  letter-spacing: -0.035em;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.modal-close {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #9ba4b1;
  background: #f5f6f8;
  border-radius: 7px;
}

.modal-close:hover {
  color: var(--ink-soft);
  background: #eceff4;
}

.modal-form {
  display: grid;
  gap: 14px;
  padding: 20px 22px 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  color: #6c7a8e;
  font-size: 10px;
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 9px 10px;
  color: var(--ink-soft);
  font-size: 11px;
  background: #fbfcfd;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: 0;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #c8c0ff;
  box-shadow: 0 0 0 3px rgba(111, 91, 231, 0.08);
}

.form-field textarea {
  min-height: 72px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.toast-region {
  position: fixed;
  z-index: 40;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  width: min(330px, calc(100vw - 44px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 13px;
  color: #fff;
  background: #252e41;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  box-shadow: 0 12px 30px rgba(18, 28, 48, 0.22);
  animation: toast-in 180ms ease-out;
}

.toast.success .toast-icon {
  color: #64d6b7;
}

.toast.info .toast-icon {
  color: #a9a1ff;
}

.toast-icon {
  display: grid;
  width: 17px;
  height: 17px;
  flex: none;
  place-items: center;
}

.toast-icon .icon {
  width: 15px;
}

.toast-message {
  color: #dce1eb;
  font-size: 10px;
  line-height: 1.55;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 1180px) {
  .content,
  .topbar {
    padding-right: 24px;
    padding-left: 24px;
  }

  .hero-graphic {
    width: 270px;
  }

  .dashboard-grid,
  .discovery-grid,
  .client-layout,
  .match-layout,
  .performance-charts {
    grid-template-columns: minmax(0, 1.4fr) minmax(270px, 0.8fr);
  }

  .discovery-row {
    grid-template-columns: minmax(190px, 1.2fr) minmax(90px, 0.55fr) minmax(115px, 0.7fr) auto;
    gap: 10px;
  }
}

@media (max-width: 960px) {
  .sidebar {
    flex-basis: 72px;
    width: 72px;
    padding-right: 9px;
    padding-left: 9px;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand-wordmark,
  .workspace-switcher,
  .nav-section-label,
  .nav-item-label,
  .nav-badge,
  .agent-status,
  .sidebar-user-copy,
  .sidebar-user > .icon {
    display: none;
  }

  .nav-section {
    margin-top: 31px;
  }

  .nav-item {
    justify-content: center;
    padding: 12px;
  }

  .nav-item.active::before {
    left: -9px;
  }

  .sidebar-user {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
  }

  .sidebar-user .avatar {
    width: 31px;
    height: 31px;
  }

  .topbar {
    padding-right: 24px;
    padding-left: 24px;
  }

  .dashboard-hero {
    padding-right: 24px;
    padding-left: 24px;
  }

  .hero-graphic {
    width: 220px;
    transform: scale(0.88);
    transform-origin: right center;
  }

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

  .dashboard-grid,
  .discovery-grid,
  .client-layout,
  .match-layout,
  .performance-charts {
    grid-template-columns: 1fr;
  }

  .discovery-row {
    grid-template-columns: minmax(210px, 1.4fr) minmax(100px, 0.6fr) minmax(130px, 0.8fr) auto;
  }

  .signal-panel {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
  }

  .signal-panel .panel-head {
    grid-column: 1 / -1;
  }

  .signal-body {
    padding-top: 0;
  }

  .agent-note {
    margin-top: 16px;
  }
}

@media (max-width: 700px) {
  .content {
    padding: 24px 16px 40px;
  }

  .topbar {
    min-height: 62px;
    padding: 0 16px;
  }

  .crumb {
    display: none;
  }

  .crumb-divider {
    display: none;
  }

  .global-search {
    width: 145px;
  }

  .global-search:focus-within {
    width: 180px;
  }

  .topbar-right {
    gap: 6px;
  }

  .topbar-divider {
    display: none;
  }

  .page-heading {
    display: block;
    margin-bottom: 20px;
  }

  .heading-actions {
    justify-content: flex-start;
    padding-top: 15px;
  }

  .dashboard-hero {
    min-height: 0;
    padding: 22px;
  }

  .hero-graphic {
    display: none;
  }

  .stat-grid,
  .performance-kpis,
  .client-cards {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .stat-card {
    min-height: 110px;
    padding: 13px;
  }

  .stat-value,
  .performance-kpi-value {
    font-size: 19px;
  }

  .activity-strip {
    grid-template-columns: 1fr;
  }

  .activity-card {
    min-height: 70px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .activity-card:last-child {
    border-bottom: 0;
  }

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

  .toolbar-left,
  .toolbar-right {
    width: 100%;
  }

  .discovery-row {
    grid-template-columns: 1fr auto;
    gap: 9px;
    padding: 13px 15px;
  }

  .discovery-row > .discovery-metric,
  .discovery-row > .discovery-actions {
    grid-row: 2;
  }

  .discovery-row > .discovery-metric:nth-child(2) {
    grid-column: 1;
  }

  .discovery-row > .discovery-metric:nth-child(3) {
    grid-column: 2;
    text-align: right;
  }

  .discovery-row > .discovery-actions {
    display: none;
  }

  .match-row {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 13px 15px;
  }

  .match-row > .match-score {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .match-row > .match-signal-list {
    grid-column: 1;
  }

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

  .data-table {
    min-width: 800px;
  }

  .signal-panel {
    display: block;
  }

  .deal-summary {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
  }

  .deal-summary-item + .deal-summary-item {
    padding-left: 15px;
  }

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

  .form-field.full {
    grid-column: auto;
  }
}

@media (max-width: 430px) {
  .sidebar {
    flex-basis: 58px;
    width: 58px;
    padding-right: 5px;
    padding-left: 5px;
  }

  .nav-item.active::before {
    left: -5px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .global-search {
    width: 120px;
  }

  .global-search:focus-within {
    width: 145px;
  }

  .topbar .avatar {
    display: none;
  }

  .page-heading h1 {
    font-size: 24px;
  }

  .stat-grid,
  .performance-kpis,
  .client-cards {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 95px;
  }

  .match-input-wrap {
    align-items: stretch;
    flex-direction: column;
    padding: 10px;
  }

  .match-input-wrap .button {
    width: 100%;
  }
}
