:root {
  color-scheme: dark;
  --bg: #050711;
  --bg-2: #070b17;
  --panel: rgba(11, 15, 29, 0.84);
  --panel-2: rgba(13, 18, 34, 0.94);
  --line: rgba(143, 165, 255, 0.14);
  --line-strong: rgba(111, 85, 255, 0.42);
  --text: #f7f9ff;
  --muted: #8d96ad;
  --muted-2: #5f6a82;
  --cyan: #38ccff;
  --blue: #3f74ff;
  --violet: #7c43ff;
  --purple: #b14cff;
  --green: #3ef28b;
  --gold: #f5bc4f;
  --danger: #ff5d93;
  --radius: 8px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 52% 42%, rgba(50, 103, 255, 0.12), transparent 32rem),
    radial-gradient(circle at 90% 2%, rgba(124, 67, 255, 0.14), transparent 24rem),
    linear-gradient(135deg, #04060e 0%, #070916 45%, #040712 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(118, 145, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(118, 145, 255, 0.035) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: linear-gradient(to bottom, transparent, #000 11%, #000 88%, transparent);
}

button, input { font: inherit; }

button, a { color: inherit; }

a { text-decoration: none; }

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(7, 10, 20, 0.98), rgba(5, 8, 17, 0.92));
  border-right: 1px solid rgba(116, 137, 255, 0.15);
}

.brand {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.brand-mark {
  width: 68px;
  height: 68px;
  filter: drop-shadow(0 0 18px rgba(56, 204, 255, 0.42));
}

.brand strong {
  display: block;
  font-size: 28px;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: #b9c2d7;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.nav-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.nav-stack::-webkit-scrollbar { width: 5px; }
.nav-stack::-webkit-scrollbar-thumb { background: rgba(124, 67, 255, 0.35); border-radius: 99px; }

.nav-label {
  margin: 18px 12px 8px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.3px;
}

.nav-item {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #c5ccdc;
  font-weight: 600;
  transition: 180ms ease;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(124, 67, 255, 0.34), rgba(56, 204, 255, 0.06));
  border-color: rgba(124, 67, 255, 0.45);
  box-shadow: inset 0 0 22px rgba(124, 67, 255, 0.11);
}

.nav-item .badge { margin-left: auto; }

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: inline-block;
  background: currentColor;
  mask: var(--svg) center / contain no-repeat;
  -webkit-mask: var(--svg) center / contain no-repeat;
}

.chevron {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-top: 1.7px solid currentColor;
  border-right: 1.7px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
  margin-left: auto;
}

[data-icon="dashboard"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); }
[data-icon="lead"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-8 0v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
[data-icon="chat"], [data-icon="message"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3C/svg%3E"); }
[data-icon="calendar"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); }
[data-icon="deal"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M3 13h18'/%3E%3C/svg%3E"); }
[data-icon="users"], [data-icon="team"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
[data-icon="home"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m3 11 9-8 9 8'/%3E%3Cpath d='M5 10v11h14V10'/%3E%3C/svg%3E"); }
[data-icon="spark"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m12 2 2.2 6.8L21 11l-6.8 2.2L12 20l-2.2-6.8L3 11l6.8-2.2z'/%3E%3C/svg%3E"); }
[data-icon="bot"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='4' y='8' width='16' height='12' rx='2'/%3E%3Cpath d='M12 2v6M8 13h.01M16 13h.01M9 18h6'/%3E%3C/svg%3E"); }
[data-icon="loop"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M3 12a9 9 0 0 1 15-6.7L21 8'/%3E%3Cpath d='M21 3v5h-5M21 12a9 9 0 0 1-15 6.7L3 16'/%3E%3Cpath d='M3 21v-5h5'/%3E%3C/svg%3E"); }
[data-icon="target"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3'/%3E%3C/svg%3E"); }
[data-icon="radar"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 12 19 5'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Cpath d='M20 12a8 8 0 1 1-8-8M4.93 19.07A10 10 0 1 0 12 2'/%3E%3C/svg%3E"); }
[data-icon="ranking"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M4 20V10M12 20V4M20 20v-7'/%3E%3C/svg%3E"); }
[data-icon="goal"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M4 4v16M4 5h11l-1 4 1 4H4'/%3E%3C/svg%3E"); }
[data-icon="badge"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m12 2 3 5 6 .8-4.3 4.1 1 5.9L12 15l-5.7 2.8 1-5.9L3 7.8 9 7z'/%3E%3C/svg%3E"); }
[data-icon="search"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); }
[data-icon="bell"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M18 8a6 6 0 1 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E"); }
[data-icon="money"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7H14a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E"); }
[data-icon="mail"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E"); }
[data-icon="task"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E"); }
[data-icon="plus"] { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }

.refer-card {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(116, 137, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.refer-card small { display: block; color: var(--muted); margin-top: 4px; }

.refer-orb {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle, #152f78 18%, #11172c 20%, #7c43ff 64%, transparent 66%);
  box-shadow: 0 0 24px rgba(124, 67, 255, 0.45);
}

.workspace {
  padding: 28px 32px 96px;
  min-width: 0;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(320px, 540px) minmax(300px, auto);
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;
}

.greeting h1 {
  margin: 0;
  font-size: clamp(24px, 2vw, 34px);
  line-height: 1.05;
}

.greeting p { margin: 8px 0 0; color: #c4cada; font-size: 16px; }
.greeting strong { color: #fff; }

.search {
  height: 52px;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid rgba(119, 139, 255, 0.15);
  border-radius: var(--radius);
  background: rgba(6, 10, 20, 0.78);
  box-shadow: inset 0 0 24px rgba(27, 42, 93, 0.16);
  color: var(--muted);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search kbd {
  min-width: 42px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #aeb6c8;
  border: 1px solid rgba(142, 160, 255, 0.17);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.icon-button,
.profile,
.select-button,
.quickbar button,
.tabs button,
.message-box button {
  border: 1px solid rgba(119, 139, 255, 0.15);
  background: rgba(8, 12, 24, 0.72);
  color: #d9def0;
  border-radius: var(--radius);
}

.icon-button {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
}

.icon-button b,
.badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--purple));
  color: #fff;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 0 16px rgba(124, 67, 255, 0.45);
}

.icon-button b {
  position: absolute;
  top: -6px;
  right: -6px;
}

.profile {
  min-width: 220px;
  height: 58px;
  display: grid;
  grid-template-columns: 42px 1fr 12px;
  gap: 12px;
  align-items: center;
  padding: 0 12px;
  text-align: left;
}

.profile small { display: block; color: var(--muted); margin-top: 2px; }

.avatar,
.center-avatar {
  display: block;
  border-radius: 50%;
  background:
    radial-gradient(circle at 52% 33%, #f3d2b1 0 16%, transparent 17%),
    linear-gradient(#161f35 0 52%, #2c4aa2 53%),
    radial-gradient(circle at 50% 35%, #d19465 0 28%, #1e1d27 29% 36%, transparent 37%),
    linear-gradient(135deg, #253868, #101527);
  border: 2px solid rgba(139, 158, 255, 0.35);
  box-shadow: 0 0 18px rgba(56, 204, 255, 0.12);
}

.avatar { width: 42px; height: 42px; }

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

.metric-card,
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 34%),
    var(--panel);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.018);
}

.metric-card::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(56, 204, 255, 0.045), transparent);
  transform: translateX(-120%);
  animation: scan 8s ease-in-out infinite;
}

.metric-card {
  min-height: 134px;
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 20px;
}

.metric-icon {
  grid-row: 1 / 4;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}

.metric-icon.violet { background: radial-gradient(circle, rgba(124, 67, 255, 0.92), rgba(68, 32, 154, 0.36)); }
.metric-icon.cyan { background: radial-gradient(circle, rgba(56, 204, 255, 0.88), rgba(27, 79, 160, 0.32)); }
.metric-icon.purple { background: radial-gradient(circle, rgba(177, 76, 255, 0.84), rgba(91, 33, 182, 0.32)); }
.metric-icon.blue { background: radial-gradient(circle, rgba(63, 116, 255, 0.9), rgba(30, 55, 145, 0.32)); }
.metric-icon.money { background: radial-gradient(circle, rgba(124, 67, 255, 0.9), rgba(38, 27, 96, 0.36)); }

.metric-card p { margin: 0; color: #d7dcf0; font-weight: 700; }
.metric-card strong { font-size: clamp(24px, 2vw, 34px); line-height: 1.05; }
.metric-card small { color: #c1c8d8; }
.metric-card small b { color: var(--green); }

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.9fr);
  gap: 20px;
}

.panel {
  padding: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(82, 115, 255, 0.08), transparent 26rem),
    var(--panel);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.panel-head p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  color: #bdc6d8;
}

.panel-head a {
  color: #8c70ff;
  font-weight: 700;
  font-size: 14px;
}

.status-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px rgba(62, 242, 139, 0.72);
}

.live-chip {
  border: 1px solid rgba(62, 242, 139, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--green);
  background: rgba(62, 242, 139, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.operation-panel {
  min-height: 466px;
}

.operation-stage {
  min-height: 310px;
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(320px, 1.3fr) minmax(180px, 0.8fr);
  gap: 20px;
  align-items: center;
}

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

.agent-list li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px 12px;
  align-items: center;
}

.agent-list strong { display: block; }
.agent-list small { display: block; color: #a8b1c4; margin-top: 3px; }
.agent-list b { display: block; color: var(--green); font-size: 13px; margin-top: 3px; }

.mini-node {
  grid-row: 1 / 4;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(111, 85, 255, 0.56);
  border-radius: 50%;
  color: #dfe8ff;
  background: radial-gradient(circle, rgba(124, 67, 255, 0.48), rgba(12, 19, 43, 0.9));
  box-shadow: 0 0 22px rgba(124, 67, 255, 0.22);
}

.orbit-system {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.orbit-system::before,
.orbit-system::after {
  content: "";
  position: absolute;
  inset: 11%;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49%, rgba(56, 204, 255, 0.32) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(124, 67, 255, 0.26) 50%, transparent 51%);
  animation: rotate 18s linear infinite;
}

.orbit-system::after {
  inset: 23%;
  opacity: 0.75;
  animation-duration: 12s;
  animation-direction: reverse;
}

.ring {
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(118, 145, 255, 0.18);
  border-radius: 50%;
}

.ring-a { transform: scaleX(1.18) rotate(16deg); border-color: rgba(56, 204, 255, 0.2); }
.ring-b { inset: 20%; transform: scaleX(1.34) rotate(-28deg); border-color: rgba(124, 67, 255, 0.24); }
.ring-c { inset: 34%; border-color: rgba(255, 255, 255, 0.12); }

.pulse {
  position: absolute;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: conic-gradient(from 40deg, var(--violet), var(--cyan), transparent 58%, var(--violet));
  filter: drop-shadow(0 0 26px rgba(56, 204, 255, 0.5));
  animation: rotate 7s linear infinite;
}

.pulse::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: #07101f;
}

.center-avatar {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  border: 4px solid rgba(56, 204, 255, 0.42);
}

.orbit-node {
  position: absolute;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  border: 1px solid rgba(124, 67, 255, 0.75);
  background: radial-gradient(circle, rgba(124, 67, 255, 0.92), rgba(8, 15, 33, 0.86));
  box-shadow: 0 0 26px rgba(124, 67, 255, 0.38);
  z-index: 3;
}

.n1 { top: 12%; left: 34%; animation: float 3s ease-in-out infinite; }
.n2 { top: 41%; left: 8%; animation: float 3.4s ease-in-out infinite 0.2s; }
.n3 { bottom: 14%; left: 27%; animation: float 3.2s ease-in-out infinite 0.4s; }
.n4 { right: 13%; bottom: 16%; animation: float 3.6s ease-in-out infinite 0.1s; }
.n5 { right: 8%; top: 19%; animation: float 3.1s ease-in-out infinite 0.3s; }

.operation-footer {
  width: fit-content;
  margin: 8px auto 0;
  padding: 12px 18px;
  border: 1px solid rgba(118, 145, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #dce3f2;
}

.ranking-panel {
  min-height: 466px;
}

.podium {
  min-height: 210px;
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  align-items: end;
  gap: 14px;
  margin-top: 12px;
}

.podium-card {
  min-height: 164px;
  padding: 18px 12px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  border: 1px solid rgba(119, 139, 255, 0.15);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
}

.podium-card.first {
  min-height: 208px;
  border-color: rgba(124, 67, 255, 0.65);
  background: linear-gradient(180deg, rgba(124, 67, 255, 0.2), rgba(255, 255, 255, 0.035));
  box-shadow: 0 0 36px rgba(124, 67, 255, 0.2);
}

.podium-card span {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
}

.podium-card.first span { color: var(--gold); }
.podium-card small { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: 1px; }
.podium-card strong { font-size: 18px; }

.rank-row {
  height: 54px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 0 16px;
  border: 1px solid rgba(119, 139, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.activity-panel,
.chart-panel,
.chat-panel { min-height: 390px; }

.activity-list,
.chat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 13px;
}

.activity-list li,
.chat-list li {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px 12px;
  align-items: center;
}

.activity-list li::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(62, 242, 139, 0.7);
}

.activity-list strong,
.chat-list strong { font-size: 15px; }

.activity-list small,
.chat-list small {
  grid-column: 2;
  color: #9ea7ba;
  margin-top: -8px;
}

.activity-list time,
.chat-list time {
  color: var(--muted);
  font-size: 13px;
  grid-column: 3;
  grid-row: 1;
}

.activity-icon {
  grid-row: 1 / 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 242, 139, 0.72), rgba(8, 17, 35, 0.92));
}

.activity-icon.visit { background: radial-gradient(circle, rgba(177, 76, 255, 0.72), rgba(8, 17, 35, 0.92)); }
.activity-icon.qualify { background: radial-gradient(circle, rgba(56, 204, 255, 0.72), rgba(8, 17, 35, 0.92)); }
.activity-icon.deal { background: radial-gradient(circle, rgba(245, 188, 79, 0.72), rgba(8, 17, 35, 0.92)); }
.activity-icon.follow { background: radial-gradient(circle, rgba(63, 116, 255, 0.72), rgba(8, 17, 35, 0.92)); }

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.tabs button {
  height: 40px;
  padding: 0 18px;
  color: #b9c2d4;
}

.tabs button.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(124, 67, 255, 0.42), rgba(124, 67, 255, 0.1));
}

.select-button {
  height: 34px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-button .chevron {
  transform: rotate(135deg);
  margin-left: 0;
}

.chart-value {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 12px;
}

.chart-value strong { font-size: 30px; }
.chart-value span { color: var(--green); }

#performance-chart {
  width: 100%;
  height: 178px;
  display: block;
}

.chat-list .avatar { grid-row: 1 / 3; }
.chat-list b:not(.badge) {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: var(--violet);
  font-size: 12px;
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
}

.avatar.team { background: radial-gradient(circle, #8a6cff, #16224c); }
.avatar.a1 { background: radial-gradient(circle at 50% 35%, #f0bf84 0 28%, #232331 29% 36%, #263d82 37%); }
.avatar.a2 { background: radial-gradient(circle at 50% 35%, #d29b64 0 28%, #1e1d25 29% 36%, #463291 37%); }
.avatar.a3 { background: radial-gradient(circle at 50% 35%, #efc3a2 0 28%, #3b2635 29% 36%, #914e77 37%); }
.avatar.a4 { background: radial-gradient(circle at 50% 35%, #c79c7a 0 28%, #1d1c23 29% 36%, #5c6f91 37%); }

.message-box {
  height: 54px;
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 10px;
  margin-top: 18px;
}

.message-box input {
  min-width: 0;
  border: 1px solid rgba(124, 67, 255, 0.58);
  border-radius: var(--radius);
  background: rgba(5, 9, 20, 0.88);
  color: #fff;
  outline: 0;
  padding: 0 16px;
  box-shadow: 0 0 22px rgba(124, 67, 255, 0.1);
}

.message-box button { display: grid; place-items: center; }

.quickbar {
  position: fixed;
  left: calc(310px + 50%);
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 10;
  width: min(940px, calc(100vw - 360px));
  min-height: 64px;
  display: grid;
  grid-template-columns: 170px repeat(4, minmax(120px, 1fr));
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(119, 139, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(9, 13, 26, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.48);
}

.quickbar span {
  padding: 0 18px;
  color: #e2e7f3;
  font-weight: 700;
}

.quickbar button {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
}

.quickbar button:hover,
.icon-button:hover,
.profile:hover,
.message-box button:hover,
.select-button:hover {
  border-color: rgba(124, 67, 255, 0.55);
  background: rgba(124, 67, 255, 0.16);
}

@keyframes scan {
  0%, 45% { transform: translateX(-120%); }
  65%, 100% { transform: translateX(120%); }
}

@keyframes rotate { to { transform: rotate(360deg); } }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

@media (max-width: 1380px) {
  .app-shell { grid-template-columns: 280px minmax(0, 1fr); }
  .sidebar { padding: 20px 16px; }
  .workspace { padding: 24px 22px 96px; }
  .topbar { grid-template-columns: 1fr 420px auto; gap: 16px; }
  .operation-stage { grid-template-columns: 1fr; }
  .agent-list { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .right-agents { order: 3; }
  .operation-footer { margin-top: 18px; }
  .quickbar { left: calc(280px + 50%); width: min(880px, calc(100vw - 320px)); }
}

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(116, 137, 255, 0.15);
  }
  .nav-stack {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    max-height: none;
  }
  .nav-label { grid-column: 1 / -1; }
  .refer-card { max-width: 360px; }
  .topbar,
  .main-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quickbar {
    position: sticky;
    left: auto;
    bottom: 0;
    transform: none;
    width: 100%;
    margin-top: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quickbar > span { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .workspace { padding: 18px 14px 32px; }
  .top-actions { justify-content: flex-start; flex-wrap: wrap; }
  .profile { min-width: 100%; }
  .kpi-grid,
  .agent-list,
  .podium,
  .quickbar,
  .nav-stack { grid-template-columns: 1fr; }
  .brand strong { font-size: 24px; }
  .panel { padding: 18px; }
  .operation-stage { gap: 8px; }
  .orbit-system { width: min(100%, 320px); }
  .chart-value { display: grid; }
}
