:root {
  --bg: #f2f3f5;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --line: #ebeef5;
  --line-strong: #dcdfe6;
  --text: #303133;
  --muted: #606266;
  --muted-light: #909399;
  --primary: #138b8a;
  --primary-hover: #1abf8f;
  --primary-active: #0f6f70;
  --primary-soft: rgba(19, 139, 138, .1);
  --primary-gradient: linear-gradient(135deg, #138b8a 0%, #23fed5 100%);
  --cyan: var(--primary);
  --cyan-dark: var(--primary-active);
  --cyan-soft: var(--primary-soft);
  --blue: #1677ff;
  --green: #52c41a;
  --green-soft: #f6ffed;
  --amber: #faad14;
  --amber-soft: #fffbe6;
  --red: #ff4d4f;
  --red-soft: #fff1f0;
  --radius: 4px;
  --radius-lg: 8px;
  --control-height: 32px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  color: var(--text);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  font-size: 12px;
  overflow: hidden;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--cyan); cursor: pointer; }
p, h1, h2, h3, h4 { margin: 0; }

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line-strong);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
  display: flex;
  gap: 18px;
  height: 60px;
  left: 0;
  padding: 0 16px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: flex;
  gap: 8px;
  width: auto;
}

.logo-img {
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  height: 38px;
  object-fit: contain;
  width: 38px;
}

.brand-name {
  color: #111827;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.context-controls {
  align-items: center;
  display: flex;
  gap: 14px;
}

.game-switcher {
  position: relative;
}

.game-switch-btn {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #111827;
  display: flex;
  gap: 8px;
  min-height: 42px;
  padding: 4px 12px;
  transition: background-color .2s ease, box-shadow .2s ease;
}

.game-switch-btn:hover {
  background: #ecfeff;
  box-shadow: inset 0 0 0 1px rgba(19, 139, 138, .18);
}

.game-switch-btn .icon {
  color: var(--muted-light);
  height: 14px;
  transform: rotate(90deg);
  width: 14px;
}

.game-logo {
  align-items: center;
  background: linear-gradient(135deg, #138b8a, #0f6f70);
  border-radius: 6px;
  color: white;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.game-logo.small {
  font-size: 12px;
  height: 28px;
  width: 28px;
}

.game-menu {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
  left: 0;
  margin-top: 8px;
  overflow: hidden;
  position: absolute;
  top: 100%;
  width: 600px;
  z-index: 60;
}

.game-menu-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
}

.game-menu-head span {
  color: var(--muted-light);
}

.game-menu-body {
  display: grid;
  gap: 0;
  max-height: 430px;
  overflow: auto;
  padding: 10px;
}

.game-menu-row {
  border-bottom: 1px solid #f2f3f5;
  display: grid;
  gap: 12px;
  grid-template-columns: 140px minmax(0, 1fr);
  padding: 8px 0;
}

.game-menu-row:last-child { border-bottom: 0; }

.game-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  padding: 7px 8px;
  text-align: left;
}

.game-item.active {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset -2px 0 0 var(--primary);
}

.version-list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.version-item {
  background: #f5f7fa;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  min-height: 32px;
  padding: 0 12px;
}

.version-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.version-item.active {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.module-tabs {
  align-items: center;
  display: flex;
  gap: 0;
  height: 60px;
}

.module-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  height: 60px;
  padding: 0 18px;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.module-tabs button:hover,
.module-tabs button.active {
  background: #f0fdfa;
  border-bottom-color: var(--primary);
  color: var(--primary);
  box-shadow: none;
}

.backend-switch {
  align-items: center;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 4px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.backend-switch .icon {
  height: 13px;
  width: 13px;
}

.backend-switch.legacy {
  background: linear-gradient(180deg, #21c98a, #0aa05b);
  border-color: #51e2a9;
  box-shadow: inset 0 1px rgba(255, 255, 255, .28), 0 1px 2px rgba(0, 0, 0, .25);
  color: white;
  font-weight: 700;
}

.backend-switch:hover {
  background: #16b66d;
  border-color: #9df4c9;
  color: white;
}

.legacy-topbar {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .22), transparent 38%),
    linear-gradient(180deg, #1299b5 0%, #0c6f87 100%);
  border-bottom: 1px solid #06495c;
  box-shadow: inset 0 -1px rgba(255, 255, 255, .16), 0 2px 5px rgba(0, 0, 0, .28);
  display: flex;
  gap: 18px;
  height: 45px;
  justify-content: flex-start;
  padding: 0 10px 0 14px;
}

.legacy-brand {
  align-items: center;
  display: flex;
  flex: 0 0 176px;
  gap: 8px;
  height: 100%;
}

.legacy-yuanyou-mark {
  align-items: center;
  background: #f5ffff;
  border-radius: 50%;
  color: #1397b3;
  display: flex;
  font-size: 30px;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.legacy-brand strong {
  color: white;
  display: block;
  font-size: 17px;
  letter-spacing: .04em;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .32);
}

.legacy-brand small {
  color: rgba(255, 255, 255, .86);
  display: block;
  font-size: 7px;
  margin-top: 4px;
}

.legacy-game {
  align-items: center;
  color: white;
  display: flex;
  gap: 7px;
  height: 100%;
}

.legacy-game-avatar {
  align-items: center;
  background: linear-gradient(135deg, #ffd8d8, #b36d72);
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 4px;
  color: white;
  display: inline-flex;
  font-weight: 700;
  height: 31px;
  justify-content: center;
  width: 31px;
}

.legacy-game strong {
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .22);
}

.legacy-caret {
  color: rgba(255, 255, 255, .9);
}

.legacy-server-tabs {
  align-items: center;
  display: flex;
  gap: 10px;
}

.legacy-server-tabs button {
  background: linear-gradient(180deg, #2fb4c7, #0f6e8a);
  border: 1px solid #0a5069;
  border-radius: 3px;
  box-shadow: inset 0 1px rgba(255, 255, 255, .32), 0 1px 1px rgba(0, 0, 0, .24);
  color: white;
  font-weight: 700;
  height: 32px;
  min-width: 70px;
}

.legacy-clock {
  align-items: center;
  color: rgba(255, 255, 255, .92);
  display: flex;
  flex: 1;
  gap: 46px;
  justify-content: center;
  min-width: 520px;
  white-space: nowrap;
}

.legacy-session {
  align-items: center;
  color: rgba(255, 255, 255, .94);
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  height: 100%;
  margin-left: auto;
  white-space: nowrap;
}

.legacy-user-avatar {
  align-items: center;
  background: linear-gradient(135deg, #d4f2cf, #3e9d65);
  border: 2px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  color: #0c5c3a;
  display: inline-flex;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.legacy-shell {
  height: calc(100vh - 45px);
  overflow: auto;
  padding: 24px;
}

.legacy-hero {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 26px 28px;
}

.legacy-no-access {
  background: #f5f7fa;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted-light);
  display: inline-flex;
  padding: 10px 14px;
}

.legacy-access-ok {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 8px;
  color: #237804;
  display: inline-flex;
  font-weight: 600;
  padding: 10px 14px;
}

.legacy-access-panel {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 18px 22px;
}

.legacy-access-panel strong {
  color: #111827;
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}

.legacy-access-panel p {
  color: var(--muted);
  font-size: 13px;
}

.legacy-kicker {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 8px;
}

.legacy-hero h1 {
  color: #111827;
  font-size: 24px;
  margin-bottom: 10px;
}

.legacy-hero p:last-child {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  max-width: 760px;
}

.legacy-frame {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.legacy-frame-toolbar {
  align-items: center;
  background: #f5f7fa;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
}

.legacy-frame-toolbar span {
  border-radius: 50%;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.legacy-frame-toolbar span:nth-child(1) { background: #ff5f57; }
.legacy-frame-toolbar span:nth-child(2) { background: #febc2e; }
.legacy-frame-toolbar span:nth-child(3) { background: #28c840; }
.legacy-frame-toolbar strong { color: var(--muted); margin-left: 8px; }

.legacy-frame-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 460px;
}

.legacy-frame-body aside {
  background: #f8fafc;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 18px 12px;
}

.legacy-frame-body aside button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  height: 36px;
  text-align: left;
  padding: 0 12px;
}

.legacy-frame-body aside button.active,
.legacy-frame-body aside button:hover {
  background: rgba(19, 139, 138, .1);
  color: var(--primary);
  font-weight: 600;
}

.legacy-frame-content {
  padding: 34px;
}

.legacy-frame-content h2 {
  color: #111827;
  font-size: 20px;
  margin-bottom: 10px;
}

.legacy-frame-content p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  max-width: 860px;
}

.legacy-cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 26px;
}

.legacy-cards article {
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

.legacy-cards strong {
  color: #111827;
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
}

.legacy-cards span {
  color: var(--primary);
  font-weight: 600;
}

.context-select, .environment {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 8px;
  height: var(--control-height);
  padding: 0 10px;
}

.context-select select, .environment select {
  background: transparent;
  border: 0;
  color: var(--text);
  outline: 0;
  min-width: 72px;
}

.environment .dot {
  background: #38bd83;
  border-radius: 100%;
  display: inline-block;
  height: 7px;
  width: 7px;
}

.environment.production {
  background: var(--amber-soft);
  border-color: #ffe58f;
}

.environment.production .dot { background: var(--amber); }

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.global-search {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  display: flex;
  gap: 7px;
  height: var(--control-height);
  padding: 0 12px;
  width: 248px;
}

.global-search input {
  background: transparent;
  border: 0;
  outline: 0;
  width: 100%;
}

.icon-btn {
  align-items: center;
  background: white;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  height: var(--control-height);
  justify-content: center;
  position: relative;
  width: 34px;
}

.icon-btn:hover, .nav-item:hover { background: var(--cyan-soft); color: var(--cyan-dark); }
.icon-btn.ai span {
  background: var(--primary-gradient);
  border-radius: 7px;
  color: white;
  font-size: 8px;
  font-weight: bold;
  position: absolute;
  right: 3px;
  top: 3px;
}

.icon-btn.bell b {
  background: var(--red);
  border-radius: 100%;
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  line-height: 16px;
  position: absolute;
  right: -4px;
  top: -5px;
  width: 16px;
}

.profile {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 9px;
  margin-left: 0;
  min-height: 42px;
  padding: 4px 10px;
}

.profile strong { display: block; font-size: 13px; font-weight: 600; }
.profile small { color: var(--muted); display: block; font-size: 11px; }
.profile > .icon {
  color: var(--muted-light);
  height: 13px;
  transform: rotate(90deg);
  width: 13px;
}
.profile-wrap { position: relative; }
.avatar {
  align-items: center;
  background: #138b8a;
  border-radius: 50%;
  color: white;
  display: flex;
  font-weight: 600;
  height: 36px;
  justify-content: center;
  width: 36px;
}
.avatar.large { height: 48px; width: 48px; }
.avatar.xl {
  font-size: 28px;
  height: 80px;
  width: 80px;
}

.user-popover {
  background: #f8f9fb;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .16);
  overflow: hidden;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 320px;
  z-index: 70;
}

.user-card-head {
  align-items: center;
  background: #f8f9fb;
  display: flex;
  gap: 20px;
  padding: 28px 32px 24px;
}

.user-card-head strong {
  color: #263659;
  display: block;
  font-size: 22px;
  margin-bottom: 10px;
}

.user-card-head p {
  color: #7b86a6;
  font-size: 18px;
  white-space: nowrap;
}

.user-popover-action,
.user-popover-logout {
  align-items: center;
  background: transparent;
  border: 0;
  color: #2f3136;
  display: flex;
  gap: 10px;
  font-size: 18px;
  justify-content: center;
  min-height: 64px;
  width: 100%;
}

.user-popover-action {
  justify-content: flex-start;
  margin: 0 32px 24px;
  min-height: 52px;
  width: calc(100% - 64px);
  border: 1px solid #e9edf5;
  border-radius: 16px;
  background: white;
}

.user-popover-action:hover { color: var(--primary); border-color: var(--primary); }

.user-popover-logout {
  border-top: 1px solid #e5e7eb;
  background: #f8f9fb;
}

.user-popover-logout:hover { color: var(--red); }

.sidebar {
  background: #ffffff;
  border-right: 1px solid var(--line);
  bottom: 0;
  left: 0;
  overflow-y: auto;
  padding: 22px 13px 18px;
  position: fixed;
  top: 60px;
  width: 222px;
}

.sidebar-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  margin: 0 10px 22px;
}

.nav-group { margin-bottom: 19px; }
.nav-group h4 {
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .03em;
  margin: 0 10px 7px;
}

.nav-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  color: var(--muted);
  display: flex;
  gap: 10px;
  height: 39px;
  padding: 0 10px;
  position: relative;
  text-align: left;
  width: 100%;
}

.nav-item.active {
  background: var(--cyan-soft);
  color: var(--cyan-dark);
  font-weight: 600;
}

.nav-item.active::before {
  background: var(--cyan);
  border-radius: 0 4px 4px 0;
  content: "";
  height: 22px;
  left: -13px;
  position: absolute;
  width: 3px;
}

.nav-count {
  background: var(--red-soft);
  border-radius: 10px;
  color: var(--red);
  font-size: 11px;
  font-style: normal;
  margin-left: auto;
  padding: 1px 7px;
}

.sidebar-foot {
  background: var(--cyan-soft);
  border: 1px solid #87e8de;
  border-radius: var(--radius-lg);
  color: var(--muted);
  margin-top: 32px;
  padding: 13px 12px;
}

.sidebar-foot strong { color: var(--cyan-dark); display: block; font-size: 12px; margin-top: 6px; }

.workspace {
  margin-left: 222px;
  min-height: 100vh;
  overflow: auto;
  padding: 60px 16px 28px;
}

.workspace-home {
  height: 100vh;
  margin-left: 0;
  padding: 60px 0 0;
}

.tabbar {
  align-items: center;
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 4px;
  height: 45px;
  margin: 0 -24px;
  padding: 7px 24px 0;
}

.home-page {
  min-height: calc(100vh - 60px);
  padding: 24px;
}

.home-filter-bar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.home-filter-bar h1 {
  color: #111827;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.home-filter-bar p {
  color: var(--muted-light);
}

.home-filters {
  align-items: center;
  display: flex;
  gap: 10px;
}

.filter-chip {
  align-items: center;
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
}

.filter-chip.active {
  background: #f0fdfa;
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.filter-chip .icon {
  color: var(--muted-light);
  height: 14px;
  width: 14px;
}

.filter-chip .icon:last-child {
  transform: rotate(90deg);
}

.home-grid {
  display: grid;
  gap: 20px;
}

.home-grid.first-row {
  grid-template-columns: 2fr 1fr;
  margin-bottom: 20px;
}

.home-grid.second-row {
  grid-template-columns: 1fr 1fr;
}

.home-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 24px;
}

.home-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.server-status-card,
.todo-panel {
  min-height: 260px;
}

.home-card-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.home-card-head h2 {
  align-items: center;
  color: #111827;
  display: flex;
  font-size: 18px;
  font-weight: 650;
  gap: 8px;
}

.home-card-head h2 .icon {
  color: var(--primary);
  height: 20px;
  width: 20px;
}

.home-card-head small,
.home-card-head a {
  color: var(--muted-light);
  font-size: 12px;
}

.home-card-head a {
  color: var(--red);
}

.todo-list {
  display: grid;
  gap: 0;
  max-height: 184px;
  overflow: auto;
}

.tab {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--muted);
  display: flex;
  gap: 15px;
  height: 38px;
  padding: 0 16px;
}

.tab span { border-radius: 50%; color: #9ba8b7; font-size: 18px; line-height: 16px; }
.tab.active {
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-color: var(--surface);
  color: var(--cyan-dark);
  font-weight: 500;
}

.page-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 25px 0 20px;
}

.crumb { color: #9aa5b3; font-size: 12px; margin-bottom: 8px; }
.page-head h1 { font-size: 23px; font-weight: 650; }
.context-note {
  align-items: center;
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 8px;
  padding: 9px 14px;
}
.risk-dot { background: #ee724e; border-radius: 50%; height: 8px; width: 8px; }

.metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 16px;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  min-height: 114px;
  padding: 18px 18px 15px;
  position: relative;
}
.metric-symbol {
  border-radius: var(--radius);
  height: 39px;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 39px;
}
.metric-symbol.cyan { background: var(--cyan-soft); }
.metric-symbol.green { background: var(--green-soft); }
.metric-symbol.red { background: var(--red-soft); }
.metric-symbol.amber { background: var(--amber-soft); }
.metric p { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.metric strong { display: block; font-size: 25px; font-weight: 650; margin-bottom: 6px; }
.metric small { font-size: 12px; }
.metric small.cyan, .em.cyan { color: var(--cyan); }
.metric small.green { color: var(--green); }
.metric small.red, .em.red { color: var(--red); }
.metric small.amber, .em.amber { color: var(--amber); }

.usage-panel { margin-bottom: 16px; }
.usage-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}
.usage-grid h3 {
  color: #425169;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 9px;
}
.usage-row {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  display: grid;
  gap: 9px;
  grid-template-columns: 26px minmax(0, 1fr) auto auto;
  min-height: 39px;
  margin-bottom: 8px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}
.usage-row:hover { background: var(--cyan-soft); border-color: #87e8de; }
.usage-row span {
  align-items: center;
  background: white;
  border-radius: 7px;
  color: var(--cyan-dark);
  display: flex;
  font-size: 12px;
  font-weight: 600;
  height: 24px;
  justify-content: center;
  width: 24px;
}
.usage-row strong {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.usage-row b { color: var(--text); font-size: 13px; font-weight: 600; }
.usage-row em {
  color: var(--green);
  font-size: 12px;
  font-style: normal;
}
.usage-row.function { grid-template-columns: 26px minmax(0, 1fr) auto 16px; }
.usage-row .icon { color: #98a6b6; height: 14px; width: 14px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 18px;
}

.ops-replica {
  display: grid;
  gap: 12px;
}

.ops-source-note {
  align-items: center;
  background: #f7fffd;
  border: 1px solid rgba(19, 139, 138, .16);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 14px;
}

.ops-source-note strong {
  color: #111827;
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.ops-source-note span,
.ops-source-note small {
  color: var(--muted-light);
}

.ops-filter-card {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
}

.ops-filter-card .search-field {
  min-width: 220px;
}

.ops-tabs {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 4px;
  padding: 6px;
  width: fit-content;
}

.ops-tabs button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  height: 30px;
  padding: 0 14px;
}

.ops-tabs button.active {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.ops-tabs button:hover {
  color: var(--primary);
}

.ops-panel {
  padding: 0;
}

.ops-panel-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 16px;
}

.ops-panel-head h2 {
  color: #111827;
  font-size: 16px;
  margin-bottom: 6px;
}

.ops-panel-head p {
  color: var(--muted);
  line-height: 1.6;
  max-width: 760px;
}

.ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ops-table th {
  white-space: nowrap;
}

.ops-table td {
  vertical-align: top;
}

.ops-table .strong-cell {
  color: #111827;
  font-weight: 600;
}

.ops-table td strong {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.ops-row-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ops-link {
  background: transparent;
  border: 0;
  color: var(--primary);
  padding: 0;
}

.ops-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.empty-cell {
  color: var(--muted-light);
  height: 96px;
  text-align: center;
}

.panel-head {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}
.panel-head h2 { font-size: 16px; font-weight: 600; }
.panel-head p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.panel-head small { color: #9aa5b3; font-size: 12px; }

.dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 16px;
}
.dashboard-grid.top { grid-template-columns: 2fr 1fr; }
.span-2 { min-height: 223px; }

.summary-table {
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
}
.summary-table th {
  background: var(--surface-soft);
  color: #6b7280;
  font-weight: 500;
  height: 38px;
}
.summary-table th:first-child, .summary-table td:first-child { text-align: left; padding-left: 13px; }
.summary-table td { border-bottom: 1px solid var(--line); color: #303133; height: 46px; text-align: center; }
.summary-table .em { font-size: 17px; font-weight: 600; }

.todo-panel { min-height: 223px; }
.todo-panel .panel-head a { color: var(--red); font-size: 12px; }
.todo {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #f3f4f6;
  color: var(--text);
  display: flex;
  font-size: 14px;
  gap: 9px;
  min-height: 42px;
  padding: 0 4px;
  width: 100%;
}
.todo:hover { background: #f9fafb; }
.todo:last-child { border: 0; }
.todo b { color: var(--red); font-weight: 600; margin-left: auto; }
.todo .icon { color: #acb6c3; height: 13px; width: 13px; }
.todo-dot {
  background: var(--red);
  border-radius: 50%;
  height: 5px;
  width: 5px;
}
.priority {
  background: #f3f6fa;
  border-radius: 4px;
  color: var(--muted);
  font-size: 10px;
  padding: 2px 5px;
}
.priority.high { background: var(--red-soft); color: var(--red); }

.alert-focus { margin-bottom: 20px; min-height: 500px; }
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: auto;
}
.data-table {
  border-collapse: collapse;
  min-width: 830px;
  width: 100%;
}
.data-table thead {
  background: var(--surface-soft);
  color: #6b7280;
  font-size: 11px;
}
.data-table th {
  font-weight: 500;
  height: 41px;
  padding: 0 13px;
  text-align: left;
  white-space: nowrap;
}
.data-table td {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  height: 50px;
  padding: 8px 13px;
  vertical-align: middle;
}
.data-table tr:hover td { background: #f5fffd; }
.data-table td strong { color: var(--text); display: block; font-weight: 500; }
.data-table td small { color: #8e9bad; display: block; font-size: 11px; margin-top: 3px; white-space: nowrap; }
.data-table td.detail { max-width: 280px; }

.badge {
  align-items: center;
  background: #e6f4ff;
  border: 1px solid #91caff;
  border-radius: 4px;
  color: var(--blue);
  display: inline-flex;
  font-size: 11px;
  line-height: 20px;
  min-height: 22px;
  padding: 0 7px;
  white-space: nowrap;
}
.badge.success { background: var(--green-soft); border-color: #b7eb8f; color: var(--green); }
.badge.danger { background: var(--red-soft); border-color: #ffa39e; color: var(--red); }
.badge.warning { background: var(--amber-soft); border-color: #ffe58f; color: #d48806; }
.badge.muted { background: #fafafa; border-color: var(--line-strong); color: var(--muted-light); }
.badge.plain { background: var(--cyan-soft); border-color: #87e8de; color: var(--cyan-dark); }
.badge.feature { background: #f9f0ff; border-color: #d3adf7; color: #722ed1; }

.link {
  background: transparent;
  border: 0;
  color: var(--cyan-dark);
  margin-right: 12px;
  padding: 3px 0;
}
.link.subtle { color: var(--muted); }

.chart-panel, .revenue { min-height: 308px; }
.segmented {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  padding: 3px;
}
.segmented button, .view-toggle button {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 12px;
}
.segmented button.selected, .view-toggle button.selected {
  background: white;
  color: var(--cyan-dark);
  box-shadow: 0 1px 5px rgba(34, 58, 84, .08);
}

.trend-chart { height: 232px; position: relative; padding: 0 5px 28px 35px; }
.trend-chart svg { height: 175px; width: 100%; }
.gridline { fill: none; stroke: #e9eff5; stroke-width: 1; }
.chart-line { fill: none; stroke: var(--cyan); stroke-width: 2.5; }
.chart-fill { fill: rgba(11, 168, 183, .07); stroke: none; }
.chart-scale {
  color: #9aa5b3;
  display: flex;
  flex-direction: column;
  font-size: 10px;
  height: 148px;
  justify-content: space-between;
  left: 0;
  position: absolute;
  top: 9px;
}
.chart-labels {
  color: #9aa5b3;
  display: flex;
  font-size: 10px;
  justify-content: space-between;
  margin-left: 12px;
  margin-top: -4px;
}

.revenue .panel-head strong { color: var(--cyan-dark); font-size: 15px; }
.revenue-total {
  color: var(--muted);
  font-size: 12px;
  margin: -8px 0 10px 28px;
}
.revenue-total strong {
  color: var(--primary);
  font-size: 14px;
}
.revenue-body { align-items: center; display: flex; height: 224px; gap: 30px; }
.donut {
  background: conic-gradient(#138b8a 0 29%, #23fed5 29% 51%, #1677ff 51% 70%, #faad14 70% 86%, #d9d9d9 86%);
  border-radius: 50%;
  height: 137px;
  margin-left: 25px;
  position: relative;
  width: 137px;
}
.donut::after {
  background: white;
  border-radius: 50%;
  content: "";
  inset: 39px;
  position: absolute;
}
.legend { flex: 1; }
.legend div {
  align-items: center;
  display: flex;
  gap: 9px;
  margin: 13px 0;
}
.legend i { border-radius: 3px; height: 9px; width: 9px; }
.legend span { color: var(--muted); font-size: 12px; }
.legend b { font-size: 12px; font-weight: 500; margin-left: auto; }

.btn {
  align-items: center;
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  display: inline-flex;
  gap: 6px;
  height: var(--control-height);
  justify-content: center;
  padding: 0 15px;
  transition: .15s ease;
}
.btn .icon { height: 16px; width: 16px; }
.btn:hover { border-color: var(--primary-hover); color: var(--primary); background: #fff; }
.btn.primary { background: var(--cyan); border-color: var(--cyan); color: white; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: white; }
.btn.danger { border-color: #ffa39e; color: var(--red); }
.btn.danger:hover { background: var(--red-soft); }
.btn.compact { font-size: 12px; height: 31px; padding: 0 12px; }

.chart-legend-line {
  align-items: center;
  border-top: 1px solid #f3f4f6;
  color: var(--muted);
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: -8px;
  padding-top: 10px;
}

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

.chart-legend-line i {
  background: var(--primary);
  display: inline-block;
  height: 2px;
  width: 14px;
}

.chart-legend-line i.muted { background: #9ca3af; }

.time-tabs {
  display: flex;
  gap: 6px;
}

.time-tabs button {
  background: #f5f7fa;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  height: 26px;
  padding: 0 10px;
}

.time-tabs button.active,
.time-tabs button:hover {
  background: var(--primary);
  color: white;
}

.action-band {
  align-items: center;
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}
.callout {
  border-radius: 11px;
  padding: 14px 18px;
}
.callout.danger {
  background: var(--red-soft);
  border: 1px solid #f9d8db;
  flex: 1;
}
.callout p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.workflow {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  display: flex;
  gap: 8px;
  padding: 21px 16px;
}
.workflow span {
  color: #99a5b4;
  font-size: 12px;
}
.workflow span:not(:last-child)::after {
  content: "›";
  margin-left: 8px;
}
.workflow .done { color: var(--green); }
.workflow .active { color: var(--cyan-dark); font-weight: 600; }

.list-panel { padding: 17px; }
.toolbar {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.field {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  height: 37px;
  padding: 0 10px;
}
.search-field { min-width: 295px; }
.field input {
  border: 0;
  margin-left: 8px;
  outline: 0;
  width: 255px;
}
.status-filter {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  height: 37px;
  min-width: 110px;
  padding: 0 10px;
}
.toolbar-space { flex: 1; }
.batch-line {
  background: var(--surface-soft);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 37px;
  margin-bottom: 12px;
  min-height: 37px;
  padding: 0 13px;
}
.batch-line .btn { height: 29px; margin-left: 8px; }
.selectable input { accent-color: var(--cyan); height: 15px; width: 15px; }

.list-intro {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 15px 18px;
}
.list-intro strong { display: block; font-size: 15px; }
.list-intro p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.view-toggle { background: #f3f6f9; border-radius: 8px; display: flex; padding: 3px; }

.three-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
.three-stats article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: flex;
  flex: 1;
  gap: 13px;
  padding: 17px;
}
.three-stats strong { color: var(--cyan-dark); font-size: 25px; }
.three-stats span { align-self: center; color: var(--muted); }
.three-stats .risk strong { color: var(--red); }

.activity-cards {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(3, 1fr);
}
.activity {
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 176px;
  padding: 16px;
}
.activity-title { display: flex; gap: 8px; justify-content: space-between; margin-bottom: 14px; }
.activity-title h3 { font-size: 15px; font-weight: 550; }
.activity-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.activity-tags span {
  background: #f3f7fa;
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
  padding: 4px 7px;
}
.activity-tags .danger-text { background: var(--red-soft); color: var(--red); }
.activity p, .activity small { color: var(--muted); display: block; font-size: 12px; margin-bottom: 9px; }
.activity-actions { align-items: center; display: flex; justify-content: space-between; }

.agent-page { display: grid; gap: 16px; }
.agent-overview {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 390px;
}
.agent-overview h2 {
  font-size: 21px;
  font-weight: 650;
  line-height: 1.35;
  margin-bottom: 14px;
}
.agent-restrictions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.agent-restrictions span {
  align-items: center;
  background: #f5fbfc;
  border: 1px solid #d9eff2;
  border-radius: 20px;
  color: #476173;
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
  line-height: 1.4;
  padding: 7px 10px;
}
.agent-restrictions .icon { color: var(--cyan-dark); height: 14px; width: 14px; }
.agent-meters {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}
.agent-meters article {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 12px;
}
.agent-meters small { color: var(--muted); display: block; font-size: 11px; margin-bottom: 8px; }
.agent-meters strong { color: var(--cyan-dark); font-size: 18px; }
.agent-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: 310px minmax(430px, 1fr) 345px;
}
.agent-tasks, .agent-chat-panel, .agent-side { min-height: 650px; }
.agent-type-picker {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.agent-type-picker button {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
  display: grid;
  gap: 5px;
  padding: 11px;
  text-align: left;
}
.agent-type-picker button.active {
  background: var(--cyan-soft);
  border-color: #87e8de;
}
.agent-type-picker strong { color: var(--text); font-size: 13px; font-weight: 600; }
.agent-type-picker span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.agent-type-picker .badge { justify-self: start; margin-top: 2px; }
.agent-new { width: 100%; }
.task-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}
.task-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  overflow: hidden;
}
.task-card.active { border-color: #87e8de; box-shadow: inset 3px 0 0 var(--cyan); }
.task-card.archived { opacity: .62; }
.task-card > button:first-child {
  background: white;
  border: 0;
  color: var(--muted);
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  text-align: left;
}
.task-card span { color: var(--cyan-dark); font-size: 11px; }
.task-card strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-card small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.task-card em { color: #97a4b4; font-size: 11px; font-style: normal; }
.task-close {
  align-items: center;
  background: var(--surface-soft);
  border: 0;
  border-left: 1px solid var(--line);
  color: #99a6b5;
  display: flex;
  justify-content: center;
}
.task-close .icon { height: 14px; width: 14px; }
.agent-chat-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
}
.agent-chat-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px;
}
.agent-chat-head h2 { font-size: 17px; font-weight: 600; margin-bottom: 5px; }
.agent-chat-head p { color: var(--muted); font-size: 12px; }
.agent-messages {
  background: #f7f8fa;
  flex: 1;
  min-height: 390px;
  overflow-y: auto;
  padding: 18px;
}
.agent-message {
  border-radius: 12px 12px 12px 3px;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 12px;
  max-width: 86%;
  padding: 11px 13px;
  white-space: pre-wrap;
}
.agent-message.bot { background: white; border: 1px solid var(--line); color: var(--text); }
.agent-message.user {
  background: var(--cyan);
  border-radius: 12px 12px 3px 12px;
  color: white;
  margin-left: auto;
}
.agent-prompts {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 0;
}
.agent-prompts button {
  background: var(--cyan-soft);
  border: 1px solid #87e8de;
  border-radius: 16px;
  color: var(--cyan-dark);
  font-size: 12px;
  padding: 7px 10px;
}
.agent-chat-form {
  display: flex;
  gap: 8px;
  padding: 13px 14px 15px;
}
.agent-chat-form input {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  flex: 1;
  min-width: 0;
  outline-color: var(--cyan);
  padding: 0 12px;
}
.player-switcher {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 12px;
}
.player-switcher button {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 3px;
  min-height: 48px;
  padding: 8px 6px;
}
.player-switcher button.active {
  background: var(--cyan-soft);
  border-color: #87e8de;
  color: var(--cyan-dark);
}
.player-switcher span { color: var(--muted); font-size: 10px; }
.agent-player-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 13px;
  padding: 14px;
}
.agent-player-card .player-name { margin-bottom: 13px; }
.agent-player-card p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.definition-grid.compact {
  gap: 10px 12px;
  margin-bottom: 12px;
}
.definition-grid.compact b {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.operation-grid {
  display: grid;
  gap: 9px;
}
.operation-grid button {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
  display: grid;
  gap: 4px 9px;
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 74px;
  padding: 11px;
  text-align: left;
}
.operation-grid button:hover { background: var(--cyan-soft); border-color: #87e8de; }
.operation-grid .icon {
  align-self: start;
  color: var(--cyan-dark);
  grid-row: span 3;
  margin-top: 1px;
}
.operation-grid strong { color: var(--text); font-size: 13px; font-weight: 600; }
.operation-grid span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.operation-grid em { color: var(--amber); font-size: 11px; font-style: normal; }

.split-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(540px, 1fr) 325px;
}
.query-panel { padding: 22px; }
.query-form { display: flex; gap: 9px; margin: 21px 0 12px; }
.query-form input {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  flex: 1;
  height: 42px;
  outline-color: var(--cyan);
  padding: 0 13px;
}
.quick-queries { display: flex; gap: 8px; margin-bottom: 20px; }
.quick-queries button {
  background: var(--cyan-soft);
  border: 1px solid #87e8de;
  border-radius: 18px;
  color: var(--cyan-dark);
  font-size: 12px;
  padding: 7px 13px;
}
.player-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.player-name {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.player-name h3 { font-size: 17px; margin-bottom: 5px; }
.player-name span { color: var(--muted); font-size: 12px; }
.player-name .badge { margin-left: auto; }
.definition-grid {
  display: grid;
  gap: 14px 25px;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 18px;
}
.definition-grid label { color: var(--muted); display: flex; flex-direction: column; font-size: 12px; gap: 6px; }
.definition-grid b { color: var(--text); font-size: 14px; font-weight: 500; }
.ai-insight {
  background: var(--cyan-soft);
  border: 1px solid #87e8de;
  border-radius: var(--radius-lg);
  color: var(--muted);
  padding: 13px 15px;
}
.ai-insight strong { color: var(--cyan-dark); }
.ai-insight p { font-size: 12px; line-height: 1.65; margin-top: 7px; }
.operations-card h2 { font-size: 16px; margin-bottom: 16px; }
.operations-card > button {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: block;
  margin-bottom: 10px;
  padding: 13px;
  text-align: left;
  width: 100%;
}
.operations-card > button:hover { border-color: #87e8de; background: var(--cyan-soft); }
.operations-card button small { color: var(--muted); display: block; margin-top: 6px; }
.guardrail {
  background: var(--amber-soft);
  border: 1px solid #ffe58f;
  border-radius: var(--radius-lg);
  color: #d48806;
  margin-top: 19px;
  padding: 14px;
}
.guardrail p { color: #7d6445; font-size: 12px; line-height: 1.6; margin-top: 6px; }

.case-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}
.case {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.case header { display: flex; justify-content: space-between; margin-bottom: 14px; }
.case header strong { display: block; }
.case header small { color: var(--muted); display: block; font-size: 11px; margin-top: 5px; }
.chat-sample {
  background: var(--surface-soft);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 13px;
  padding: 10px;
}
.case-meta {
  color: var(--muted);
  display: flex;
  font-size: 11px;
  justify-content: space-between;
}
.case-meta b { color: var(--red); }
.recommend {
  align-items: center;
  background: var(--cyan-soft);
  border: 1px solid #87e8de;
  border-radius: var(--radius);
  color: var(--cyan-dark);
  display: flex;
  font-size: 12px;
  gap: 7px;
  margin-top: 13px;
  padding: 10px;
}
.case footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

.onboarding-top {
  align-items: center;
  background: linear-gradient(110deg, var(--cyan-soft), white);
  border: 1px solid #87e8de;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 20px;
}
.onboarding-top h2 { font-size: 18px; margin-bottom: 7px; }
.onboarding-top p { color: var(--muted); font-size: 13px; }
.steps { padding: 16px 21px; }
.step {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  min-height: 88px;
  position: relative;
}
.step:last-child { border-bottom: 0; }
.step-number {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  display: flex;
  font-weight: 600;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.step.active .step-number { background: var(--cyan); color: white; }
.step-body { flex: 1; }
.step-body > div { align-items: center; display: flex; gap: 10px; }
.step-body h3 { font-size: 14px; font-weight: 550; }
.step-body p { color: #49566a; font-size: 13px; margin: 7px 0; }
.step-body small { color: var(--muted); font-size: 11px; }

.permission-banner {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  gap: 17px;
  margin-bottom: 14px;
  padding: 18px 20px;
}
.permission-banner strong { font-size: 15px; white-space: nowrap; }
.permission-banner p { color: var(--muted); flex: 1; font-size: 13px; }

.overlay {
  background: rgba(11, 22, 38, .26);
  inset: 0;
  position: fixed;
  z-index: 30;
}
.drawer {
  background: white;
  bottom: 0;
  box-shadow: -12px 0 24px rgba(0, 0, 0, .12);
  position: fixed;
  right: 0;
  top: 0;
  width: 460px;
  z-index: 31;
}
.drawer header {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 25px 25px 18px;
}
.drawer header h2 { font-size: 19px; margin-bottom: 7px; }
.drawer header p { color: var(--muted); font-size: 12px; }
.drawer header button {
  background: transparent;
  border: 0;
  color: var(--muted);
}
.drawer form { padding: 22px 25px; }
.drawer label {
  display: block;
  margin-bottom: 17px;
}
.drawer label span {
  color: var(--text);
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}
.drawer label input,
.drawer label select,
.drawer label textarea {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline-color: var(--cyan);
  padding: 0 12px;
  width: 100%;
}

.drawer label input,
.drawer label select {
  height: 43px;
}

.drawer label textarea {
  line-height: 1.6;
  padding: 10px 12px;
  resize: vertical;
}
.drawer-warning {
  background: var(--amber-soft);
  border: 1px solid #ffe58f;
  border-radius: var(--radius);
  color: #d48806;
  font-size: 12px;
  line-height: 1.6;
  padding: 12px 13px;
}
.drawer footer {
  border-top: 1px solid var(--line);
  bottom: 0;
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  left: 0;
  padding: 16px 25px;
  position: absolute;
  right: 0;
}

.ops-dialog {
  width: 520px;
}

.ops-dialog form {
  padding-bottom: 92px;
}

.ops-dialog-summary {
  align-items: center;
  background: #f0fdfa;
  border: 1px solid rgba(19, 139, 138, .18);
  border-radius: var(--radius-lg);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 12px 14px;
}

.ops-dialog-summary strong {
  color: var(--text);
}

.ops-dialog-summary span {
  color: var(--primary-active);
  font-weight: 600;
}

.ops-form-grid {
  display: grid;
  gap: 0 14px;
  grid-template-columns: 1fr 1fr;
}

.ops-full-field {
  display: block;
}

.assistant {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  bottom: 25px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
  display: flex;
  flex-direction: column;
  height: 560px;
  position: fixed;
  right: 25px;
  width: 390px;
  z-index: 29;
}
.assistant header {
  align-items: center;
  background: var(--primary-gradient);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  color: white;
  display: flex;
  justify-content: space-between;
  padding: 16px;
}
.assistant header > div { align-items: center; display: flex; gap: 10px; }
.assistant header strong, .assistant header small { display: block; }
.assistant header small { color: #dcfcff; font-size: 11px; margin-top: 3px; }
.assistant header button { background: transparent; border: 0; color: white; }
.messages {
  background: #f7f8fa;
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.message {
  border-radius: 12px 12px 12px 3px;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 12px;
  max-width: 89%;
  padding: 10px 12px;
}
.message.bot { background: white; border: 1px solid var(--line); }
.message.user {
  background: var(--cyan);
  border-radius: 12px 12px 3px 12px;
  color: white;
  margin-left: auto;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 11px 13px 0;
}
.chips button {
  background: var(--cyan-soft);
  border: 1px solid #87e8de;
  border-radius: 14px;
  color: var(--cyan-dark);
  font-size: 11px;
  padding: 6px 8px;
}
.assistant form {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 7px;
  margin-top: 11px;
  padding: 13px;
}
.assistant form input {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  flex: 1;
  outline-color: var(--cyan);
  padding: 0 11px;
}

.toast {
  background: #000000d9;
  border-radius: var(--radius);
  bottom: 27px;
  color: white;
  font-size: 13px;
  left: 50%;
  padding: 13px 18px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 40;
}

@media (max-width: 1200px) {
  .global-search { display: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .dashboard-grid.top, .activity-cards, .case-grid, .split-layout, .usage-grid, .agent-overview, .agent-layout { grid-template-columns: 1fr; }
  .agent-tasks, .agent-chat-panel, .agent-side { min-height: auto; }
}

@media (max-width: 900px) {
  .topbar { gap: 12px; overflow-x: auto; }
  .brand { width: auto; }
  .brand-name { font-size: 16px; white-space: nowrap; }
  .context-controls { display: flex; }
  .module-tabs button { white-space: nowrap; }
  .profile div:not(.avatar) { display: none; }
  .sidebar { width: 62px; padding: 16px 8px; }
  .sidebar-title, .nav-group h4, .nav-item span, .nav-count, .sidebar-foot { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .workspace { margin-left: 62px; padding-left: 14px; padding-right: 14px; }
  .workspace-home { margin-left: 0; padding-left: 0; padding-right: 0; }
  .home-grid.first-row, .home-grid.second-row { grid-template-columns: 1fr; }
  .home-filter-bar { align-items: flex-start; flex-direction: column; gap: 12px; }
  .home-filters { flex-wrap: wrap; }
  .agent-meters, .player-switcher { grid-template-columns: 1fr; }
  .agent-message { max-width: 100%; }
  .usage-row { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .usage-row em { display: none; }
}
