:root {
  --ink: #1d2129;
  --text: #1d2129;
  --muted: #4e5969;
  --faint: #86909c;
  --line: #e5e6eb;
  --soft-line: #f0f1f3;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #f2f3f5;
  --input-bg: #ffffff;
  --primary: #2aa846;
  --primary-2: #1b9139;
  --primary-soft: #e9f6ec;
  --side-bg: #2aa846;
  --side-bg-2: #1b9139;
  --side-text: rgba(255,255,255,.92);
  --side-muted: rgba(255,255,255,.68);
  --side-active: rgb(25, 135, 53);
  --blue: #165dff;
  --blue-soft: #e8f3ff;
  --amber: #b7791f;
  --amber-soft: #fff7e8;
  --violet: #6b5dd3;
  --violet-soft: #f2efff;
  --danger: #e5484d;
  --danger-soft: #fff5f5;
  --shadow: none;
  --shadow-sm: none;
  --radius: 4px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "noto sans", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "noto sans", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5715;
}

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

button,
select,
input,
textarea {
  outline: none;
}

button { cursor: pointer; }

a { color: inherit; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(47,158,68,.14), transparent 42%),
    linear-gradient(180deg, #f6fbf7, #eef7f0);
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 20px 70px rgba(31,42,55,.12);
}

.login-art {
  display: none;
}

.login-art::after {
  content: none;
}

.login-art > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.brand img {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}

.logo-brand img {
  width: 142px;
  height: 44px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}

.login-logo-image {
  width: min(440px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
}

.login h1 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.login p {
  margin: 6px 0 0;
  color: var(--muted);
}

.login-art h1 {
  color: var(--ink);
  font-size: 30px;
}

.login-art p {
  max-width: 600px;
  color: var(--muted);
  font-size: 15px;
}

.login-art img {
  width: min(380px, 100%) !important;
  border: 1px solid var(--soft-line);
  border-radius: 6px !important;
  box-shadow: none;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-weight: 650;
}

.field > span,
.field-title > span {
  font-size: 12px;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 10px;
  background: var(--input-bg);
  color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

select {
  appearance: none;
  padding-right: 32px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47,158,68,.1);
}

.primary,
.secondary,
.danger,
.link,
.file-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 4px;
  border: 1px solid transparent;
  padding: 0 13px;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}

.primary {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.primary:hover {
  background: var(--primary-2);
}

.secondary,
.file-button {
  background: #f3f4f6;
  color: #1f2937;
  border-color: var(--line);
  font-weight: 600;
}

.secondary:hover,
.file-button:hover {
  border-color: #d1d5db;
  background: var(--surface-3);
}

.danger {
  min-height: 30px;
  background: transparent;
  color: var(--danger);
  border-color: transparent;
  font-weight: 600;
}

.link {
  min-height: 30px;
  padding: 0 7px;
  background: transparent;
  color: var(--primary);
  border-color: transparent;
  font-weight: 750;
}

.link:hover {
  background: transparent;
  text-decoration: underline;
}

.compact-btn {
  min-height: 32px;
  padding: 0 11px;
  font-size: 13px;
}

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

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 0;
  border-right: 0;
  background:
    url("/images/sidebar/menu_content-BmKzXIgB.png") center center / contain no-repeat,
    linear-gradient(90deg, var(--side-bg), var(--side-bg-2));
  scrollbar-width: none;
}

.side::-webkit-scrollbar { width: 0; height: 0; }

.side-logo-strip {
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: rgba(10, 102, 43, .16);
}

.side-logo-strip .brand {
  height: 52px;
  width: 100%;
  padding: 0;
  color: #fff;
}

.side-logo-strip .brand img {
  width: 142px;
  height: 38px;
  object-fit: contain;
  object-position: left center;
  background: transparent;
  box-shadow: none;
}

.side-scroll {
  min-height: 0;
  overflow: auto;
  padding: 20px 10px 10px;
  scrollbar-width: none;
}

.side-scroll::-webkit-scrollbar { width: 0; height: 0; }

.side-status {
  display: grid;
  gap: 4px;
  margin: 0 10px 12px;
  padding: 9px 10px;
  border-radius: 4px;
  background: rgba(11, 96, 42, .34);
}

.side-status span {
  color: var(--side-muted);
  font-size: 12px;
}

.side-status b {
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-group {
  display: grid;
  gap: 3px;
}

.nav-section {
  padding: 10px 10px 5px;
  color: var(--side-muted);
  font-size: 12px;
  font-weight: 600;
}

.nav button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--side-text);
  text-align: left;
  padding: 0 10px;
  font-weight: 500;
}

.nav button:hover {
  background: rgba(255,255,255,.08);
  box-shadow: none;
  color: #fff;
}

.nav button.active {
  background: var(--side-active);
  color: #fff;
  box-shadow: none;
}

.nav-dot {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.86);
  font-size: 12px;
  font-weight: 700;
}

.nav-dot::before {
  content: none;
}

.nav button.active .nav-dot {
  background: rgba(255,255,255,.2);
  box-shadow: none;
}

.nav button.active .nav-dot::before {
  background: #fff;
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.top-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.top-title b {
  color: var(--ink);
  font-size: 14px;
}

.top-title span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-actions,
.head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.top-chip {
  max-width: 220px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #cfe8d6;
  border-radius: 4px;
  padding: 0 11px;
  background: #f1fbf4;
  color: var(--primary-2);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--bg);
  overflow: hidden;
}

.page-frame {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  background: var(--bg);
}

.page-tabs-bar {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 6px 20px 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.page-tabs-shell {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.page-tabs-shell::-webkit-scrollbar { display: none; }

.page-tabs-shell button {
  position: relative;
  height: 38px;
  min-width: 132px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-bottom-color: var(--line);
  border-radius: 8px 8px 0 0;
  padding: 0 22px;
  background: #f7f8fa;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.page-tabs-shell button:hover {
  color: var(--primary);
  background: #f2f3f5;
}

.page-tabs-shell button.active {
  z-index: 1;
  border-bottom-color: #fff;
  background: #fff;
  color: var(--primary);
  font-weight: 650;
}

.page-tabs-shell button i {
  color: #c0c4cc;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
}

.page-body {
  min-width: 0;
  min-height: 0;
  flex: 1;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px 18px 18px;
  overflow: auto;
  background: var(--bg);
}

.module-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.module-toolbar h1 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 650;
}

.module-toolbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.head,
.panel,
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: #fff;
  box-shadow: none;
}

.head h1 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.22;
}

.head p {
  margin: 4px 0 0;
  color: var(--muted);
}

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

.card {
  position: relative;
  overflow: hidden;
  min-height: 78px;
  padding: 13px 14px;
  border-left: 0;
  background: #fff;
}

.card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card b {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.1;
}

.card em {
  display: block;
  margin-top: 8px;
  color: var(--faint);
  font-size: 12px;
  font-style: normal;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(300px, .78fr);
  gap: 14px;
  align-items: start;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, .72fr);
}

.visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .62fr);
  gap: 14px;
}

.panel {
  min-width: 0;
  padding: 0;
  background: #fff;
}

.visual-panel {
  min-height: 100%;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.panel-title span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.panel-title small {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 4px;
  padding: 0 7px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

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

.logo-preview,
.login-logo-preview,
.direct-upload-preview {
  min-height: 116px;
  display: grid;
  place-items: center;
  gap: 8px;
  margin: 16px 16px 13px;
  border: 1px dashed #d1d5db;
  border-radius: var(--radius);
  background: #f9fafb;
  color: var(--muted);
}

.logo-preview img {
  max-width: min(380px, 100%);
  max-height: 88px;
  object-fit: contain;
}

.login-logo-preview img,
.direct-upload-preview img {
  width: min(260px, 100%);
  max-height: 80px;
  object-fit: contain;
}

.direct-upload {
  display: grid;
  gap: 10px;
  margin: 16px;
}

.direct-upload-preview {
  cursor: pointer;
}

.direct-upload-preview:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.direct-upload-input { display: none; }

.direct-upload-actions,
.upload-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.file-button.small {
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
}

.upload-thumb {
  width: 132px;
  height: 58px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.upload-hint,
.field-title small {
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
}

.table-filter {
  display: grid;
  grid-template-columns: minmax(124px, 160px) minmax(200px, 320px) minmax(124px, 156px) auto auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.filter-spacer { min-width: 1px; }

.ghost-action {
  color: var(--primary-2);
  border-color: #cfe8d6;
  background: #f1fbf4;
}

.table {
  width: calc(100% - 28px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 14px;
  background: #fff;
}

.has-actions {
  min-width: 1080px;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  table-layout: fixed;
}

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

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f2f3f5;
  color: #1d2129;
  font-size: 13px;
  font-weight: 600;
}

tbody tr:hover td {
  background: #fbfdfc;
}

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

.has-actions th:last-child,
.has-actions td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 236px;
  background: #fff;
  box-shadow: -1px 0 0 var(--line);
}

.has-actions th:last-child {
  z-index: 3;
  background: #f7f8fa;
}

.has-actions tbody tr:hover td:last-child {
  background: #fbfdfc;
}

.ops {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 220px;
}

.badge,
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 24px;
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
}

.badge.ok,
.status {
  background: #e7f8ed;
  color: #1f7a3b;
}

.badge.bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.neutral {
  background: #f1f5f9;
  color: #64748b;
}

.code-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 4px;
  padding: 0 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
}

.table-link {
  color: var(--blue);
  text-decoration: none;
}

.table-link:hover { text-decoration: underline; }

.account-cell {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.account-cell > span:last-child {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.account-cell b {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-cell small {
  overflow: hidden;
  color: var(--faint);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-dot,
.real-avatar,
.cartoon-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.avatar-dot {
  display: inline-grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.real-avatar {
  display: inline-block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .92);
  background: var(--avatar-bg, var(--primary-soft));
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, .08),
    0 7px 15px rgba(15, 23, 42, .12);
}

.real-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cartoon-avatar {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .08);
  background:
    radial-gradient(circle at 68% 22%, rgba(255,255,255,.65) 0 11%, transparent 12%),
    var(--avatar-bg, var(--primary-soft));
  box-shadow: inset 0 -5px 10px rgba(15, 23, 42, .08);
}

.cartoon-face {
  position: absolute;
  left: 5px;
  top: 7px;
  width: 18px;
  height: 17px;
  border-radius: 48% 48% 45% 45%;
  background: var(--avatar-face, #fff);
}

.cartoon-hair {
  position: absolute;
  left: 5px;
  top: 4px;
  width: 18px;
  height: 9px;
  border-radius: 12px 12px 8px 8px;
  background: var(--avatar-ink, var(--primary));
}

.cartoon-eye {
  position: absolute;
  top: 7px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--avatar-ink, var(--primary));
}

.cartoon-eye.left { left: 5px; }
.cartoon-eye.right { right: 5px; }

.cartoon-mouth {
  position: absolute;
  left: 7px;
  bottom: 4px;
  width: 5px;
  height: 3px;
  border-bottom: 2px solid var(--avatar-ink, var(--primary));
  border-radius: 0 0 8px 8px;
}

.cartoon-avatar.avatar-1 .cartoon-hair {
  top: 3px;
  height: 11px;
  border-radius: 50% 50% 35% 35%;
}

.cartoon-avatar.avatar-2 .cartoon-hair {
  left: 4px;
  top: 5px;
  width: 20px;
  height: 7px;
  border-radius: 9px 9px 3px 3px;
}

.cartoon-avatar.avatar-3 .cartoon-eye {
  width: 4px;
  height: 2px;
  border-radius: 8px;
}

.cartoon-avatar.avatar-4 .cartoon-mouth {
  width: 6px;
  height: 2px;
  border-bottom-width: 1px;
}

.cartoon-avatar.avatar-5 .cartoon-face {
  top: 8px;
  border-radius: 45% 45% 50% 50%;
}

.detail {
  display: grid;
  gap: 0;
  padding: 4px 16px 12px;
}

.detail p {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--soft-line);
  color: var(--muted);
  word-break: break-all;
}

.detail p:last-child { border-bottom: 0; }

.detail b {
  color: var(--ink);
}

.meter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
}

.meter-panel {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
}

.meter-card {
  display: grid;
  gap: 9px;
  border: 1px solid #cfe8d6;
  border-radius: var(--radius);
  padding: 12px;
  background: #f6fbf7;
}

.meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.meter-head b {
  color: var(--ink);
}

.meter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.meter-top b {
  color: var(--primary-2);
}

.meter-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

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

.meter-panel.blue .meter-track span { background: var(--blue); }
.meter-panel.violet .meter-track span { background: var(--violet); }
.meter-panel.amber .meter-track span { background: #d89b24; }

.meter-panel p {
  margin: 0;
  color: var(--faint);
  font-size: 12px;
}

.meter-card p,
.meter-card small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.meter-card small {
  color: var(--faint);
}

.ops-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 16px;
}

.ops-summary > div {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
}

.ops-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ops-summary b {
  overflow: hidden;
  color: var(--ink);
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .66fr);
}

.priority-list,
.endpoint-list {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.priority-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.priority-item b {
  grid-row: span 2;
  color: var(--primary);
}

.priority-item span {
  color: var(--ink);
  font-weight: 750;
}

.priority-item small {
  color: var(--muted);
}

.api-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.api-group {
  align-content: start;
}

.endpoint-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.endpoint-row:hover {
  border-color: var(--line);
  background: #fbfdfc;
}

.endpoint-row code {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.endpoint-method {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.api-doc-tree {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.api-doc-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.api-doc-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 500;
}

.api-doc-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.api-doc-lines {
  overflow: auto;
  padding: 18px 20px 24px;
  background: #fff;
}

.api-doc-root {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 500;
}

.api-doc-line {
  min-height: 28px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #3f4652;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  line-height: 1.6;
  text-decoration: none;
  white-space: nowrap;
}

.api-doc-line.group {
  margin-top: 4px;
  color: var(--ink);
  font-size: 16px;
}

.api-doc-line.group b {
  font-weight: 500;
}

.api-doc-line.group em {
  color: var(--faint);
  font-family: inherit;
  font-size: 12px;
  font-style: normal;
}

.api-doc-line.module {
  color: #4e5969;
}

.api-doc-line.endpoint:hover {
  color: var(--primary);
}

.api-doc-line code {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
}

.api-doc-line small {
  color: #9aa3ad;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.tree-prefix {
  flex: 0 0 auto;
  color: #626b76;
  white-space: pre;
}

.api-method-text {
  min-width: 44px;
  color: #165dff;
  font-weight: 500;
}

.api-method-text.post,
.api-method-text.put {
  color: var(--primary);
}

.api-method-text.delete {
  color: var(--danger);
}

.api-method-text.all {
  color: #b7791f;
}

.empty-state {
  min-height: 132px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px dashed #d1d5db;
  border-radius: var(--radius);
  margin: 16px;
  background: #f9fafb;
  color: var(--faint);
}

.empty-state b {
  color: var(--ink);
}

.contact-preview {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 16px;
  background: #fff;
}

.contact-copy {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
}

.contact-copy h2 {
  margin: 0 0 4px;
  color: var(--ink);
}

.contact-copy p {
  margin: 0;
  color: var(--muted);
}

.contact-copy strong {
  color: var(--primary);
}

.contact-art {
  display: grid;
  place-items: center;
  background: #f1fbf4;
}

.contact-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-art span {
  color: var(--primary);
  font-weight: 900;
}

.translation-usage-grid {
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr);
}

.conversation-log {
  display: grid;
  gap: 10px;
}

.conversation-message {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
}

.conversation-message.out {
  border-left: 3px solid var(--primary);
}

.conversation-message.in {
  border-left: 3px solid #94a3b8;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.message-meta b {
  color: var(--ink);
  font-size: 13px;
}

.message-meta time {
  margin-left: auto;
}

.message-body {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.message-direction {
  min-width: 38px;
  border-radius: 3px;
  padding: 2px 6px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.conversation-message.out .message-direction {
  background: var(--primary-soft);
  color: var(--primary-2);
}

.message-body strong {
  color: var(--ink);
  white-space: nowrap;
}

.message-body p {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}

.permission-field {
  gap: 12px;
}

.field-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.permission-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.permission-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.permission-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
}

.permission-group b {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
}

.membership-panel {
  overflow: auto;
  padding: 0;
}

.membership-table {
  min-width: 860px;
  display: grid;
  padding: 0 0 12px;
}

.membership-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(120px, 1fr));
  align-items: center;
  min-height: 52px;
  padding: 0 22px;
  border-bottom: 1px solid var(--soft-line);
}

.membership-head {
  min-height: 58px;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: #f3f4f6;
  color: var(--ink);
  font-size: 16px;
}

.membership-group {
  padding: 20px 22px 8px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.membership-feature {
  color: #667085;
  font-weight: 700;
}

.membership-row > span:not(.membership-feature),
.membership-row > b:not(:first-child) {
  justify-self: center;
}

.perm-ok,
.perm-no {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.perm-ok { background: #2faa52; }

.perm-no {
  background: #d9dde2;
  color: #fff;
}

.perm-text {
  color: #667085;
  font-weight: 700;
}

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

.check-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--text);
  font-weight: 650;
}

.check-item input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--primary);
}

.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  max-width: min(360px, calc(100vw - 40px));
  border-radius: var(--radius);
  padding: 11px 14px;
  background: #0f172a;
  color: #fff;
  box-shadow: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .38);
  backdrop-filter: none;
}

.modal {
  width: min(820px, 100%);
  max-height: min(86vh, 920px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15,23,42,.2);
}

.modal-head,
.modal-foot {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head b {
  color: var(--ink);
  font-size: 16px;
}

.modal-foot {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: #fff;
}

.modal-body {
  overflow: auto;
  padding: 18px;
  background: #fff;
}

.modal-error {
  margin: 0 0 14px;
  border: 1px solid #ffd7d9;
  border-radius: 4px;
  padding: 9px 12px;
  background: #fff5f5;
  color: #c7393f;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .visual-grid,
  .integration-grid,
  .grid,
  .dashboard-grid { grid-template-columns: 1fr; }

  .api-groups { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .login {
    grid-template-columns: 1fr;
  }

  .login-panel {
    min-height: 58vh;
    padding: 34px 22px;
  }

  .login-art {
    min-height: 42vh;
    padding: 32px 22px;
  }

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

  .side {
    position: static;
    height: auto;
    max-height: none;
    grid-template-rows: auto auto auto;
    padding: 0;
  }

  .side-logo-strip {
    height: 52px;
  }

  .side-scroll {
    padding: 10px;
  }

  .side-status {
    margin: 0 10px 10px;
  }

  .nav {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .nav-group {
    min-width: 172px;
    align-content: start;
  }

  .main {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .top {
    position: static;
    align-items: flex-start;
    padding: 14px 16px;
    flex-direction: column;
  }

  .content {
    padding: 0;
  }

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

  .cards,
  .meter-grid,
  .ops-summary,
  .permission-groups,
  .check-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .table-filter {
    grid-template-columns: 1fr 1fr;
  }

  .chat-records-filter {
    grid-template-columns: 1fr 1fr;
  }

  .live-chat-filter__bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .live-chat-filter__left {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .live-chat-desc {
    white-space: normal;
  }

  .live-chat-board {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .live-chat-col {
    min-height: 360px;
    border-bottom: 1px solid var(--line);
  }

  .live-chat-filter__form {
    align-items: stretch;
    flex-direction: column;
  }

  .live-chat-filter__item,
  .live-chat-control,
  .live-chat-static-select {
    width: 100%;
  }

  .chat-records-filter input {
    grid-column: 1 / -1;
  }

  .chat-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .filter-spacer { display: none; }

  .ghost-action {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  body { font-size: 13px; }

  .login-panel,
  .login-art {
    padding: 26px 16px;
  }

  .top-actions,
  .head-actions {
    width: 100%;
  }

  .top-actions > *,
  .head-actions > *,
  .head > .primary {
    flex: 1 1 auto;
  }

  .top-chip {
    max-width: 100%;
    width: 100%;
    justify-content: center;
  }

  .content {
    padding: 0;
  }

  .head,
  .card {
    padding: 13px;
  }

  .cards {
    gap: 10px;
  }

  .table-filter {
    grid-template-columns: 1fr;
  }

  .contact-preview {
    grid-template-columns: 1fr;
  }

  .endpoint-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .contact-art {
    min-height: 150px;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal-head,
  .modal-foot {
    min-height: 54px;
    padding: 0 12px;
  }

  .modal-body {
    padding: 12px;
  }
}

/* ChatKnow source-style refinement */
html,
body,
button,
input,
textarea,
select,
table {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "noto sans", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  line-height: 1.45;
}

.shell {
  height: 100vh;
  min-height: 100vh;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-rows: 52px minmax(0, 1fr);
  overflow: hidden;
}

.app-header {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  align-items: center;
  height: 52px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  z-index: 10;
}

.header-logo {
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: linear-gradient(90deg, var(--side-bg), var(--side-bg-2));
}

.header-logo .brand {
  height: 52px;
  width: 100%;
  font-weight: 500;
}

.header-logo .brand img {
  width: 132px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
  border-radius: 0;
  background: transparent;
}

.header-title {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 0 20px 0 28px;
}

.header-title b,
.top-title b {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-title span,
.top-title span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header .top-actions {
  padding-right: 20px;
}

.side {
  top: 52px;
  height: calc(100vh - 52px);
  grid-row: 2;
  grid-template-rows: minmax(0, 1fr) auto;
}

.side-logo-strip {
  display: none;
}

.side-scroll {
  padding: 24px 10px 10px;
}

.main {
  grid-row: 2;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.top {
  display: none;
}

.content {
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background: var(--bg);
}

.nav-section,
.nav button,
.nav-dot,
.side-status b,
.primary,
.secondary,
.danger,
.link,
.file-button,
.field,
.upload-hint,
.field-title small,
.badge,
.status,
.meter-head,
.meter-top,
.ops-summary span,
.priority-item span,
.endpoint-method,
.message-direction,
.membership-group,
.membership-feature,
.perm-ok,
.perm-no,
.perm-text,
.check-item,
.code-chip {
  font-weight: 400;
}

.nav button.active,
.nav button.active .nav-dot,
.panel-title,
.head h1,
.top-chip,
th,
.card b,
.ops-summary b,
.message-meta b,
.message-body strong,
.detail b,
.empty-state b,
.permission-group b,
.priority-item b,
.membership-head,
.membership-row > b {
  font-weight: 500;
}

.nav button {
  min-height: 40px;
  width: 180px;
  margin: 0 0 4px;
  border-radius: 4px;
  color: rgba(255, 255, 255, .9);
  font-size: 14px;
}

.nav button:hover {
  background: rgba(255, 255, 255, .08);
}

.nav button.active {
  position: relative;
  background: rgb(25, 135, 53);
}

.nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: #fff;
}

.nav-dot {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: transparent;
  font-size: 12px;
}

.head,
.panel,
.card {
  border-color: var(--line);
  border-radius: 4px;
  box-shadow: none;
}

.head {
  padding: 12px 16px;
}

.head h1 {
  font-size: 18px;
}

.panel-title {
  min-height: 44px;
  margin-bottom: 0;
  font-size: 15px;
}

.card {
  min-height: 78px;
  padding: 13px 14px;
}

.card span {
  font-size: 12px;
  font-weight: 400;
}

.card b {
  font-size: 21px;
}

.table-filter {
  padding: 12px 16px;
  background: #fff;
}

th,
td {
  padding: 8px 16px;
}

th {
  background: #f2f3f5;
  color: #1d2129;
}

.primary {
  background: var(--primary);
  border-color: var(--primary);
}

.secondary,
.file-button {
  background: #f7f8fa;
  color: #1d2129;
  border-color: var(--line);
}

.secondary:hover,
.file-button:hover {
  background: #f2f3f5;
}

@media (max-width: 900px) {
  .shell {
    height: auto;
    overflow: visible;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .app-header {
    grid-template-columns: 1fr;
    height: auto;
  }

  .header-logo {
    height: 52px;
  }

  .header-title {
    padding: 12px 16px;
  }

  .app-header .top-actions {
    padding: 0 16px 12px;
  }

  .side {
    top: 0;
    height: auto;
    grid-row: auto;
  }

.main {
  grid-row: auto;
  overflow: visible;
}
}

/* Final layout pass: keep the admin workspace close to the user backend style. */
.content {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--bg);
}

.page-frame {
  min-width: 0;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.page-tabs-bar {
  padding: 6px 20px 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.page-tabs-shell button {
  height: 38px;
  min-width: 124px;
  border-radius: 7px 7px 0 0;
  font-weight: 400;
}

.page-tabs-shell button.active {
  color: var(--primary);
  font-weight: 500;
}

.page-body {
  min-width: 0;
  min-height: 0;
  flex: 1;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px;
  overflow: auto;
  background: var(--bg);
}

.page-intro {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 10px 7px 13px;
  border: 1px solid #dfe7e2;
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  background: #fbfcfb;
}

.page-intro p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #66717e;
  font-size: 13px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-intro .head-actions {
  flex: 0 0 auto;
}

.module-toolbar,
.head,
.panel,
.card {
  border-radius: 4px;
  box-shadow: none;
}

.module-toolbar {
  padding: 12px 16px;
  background: #fff;
}

.module-toolbar h1 {
  font-size: 17px;
  font-weight: 500;
}

.module-toolbar p {
  font-size: 13px;
}

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

.table-filter {
  grid-template-columns: minmax(128px, 172px) minmax(240px, 1fr) minmax(128px, 160px) auto auto;
  justify-content: start;
}

.table {
  width: auto;
  max-width: none;
  margin: 16px;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 920px;
}

.has-actions {
  min-width: 1040px;
}

td {
  color: #3f4652;
  font-weight: 400;
}

.conversation-log {
  padding: 16px;
}

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

@media (max-width: 1180px) {
  .translation-usage-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .content,
  .page-frame {
    overflow: visible;
  }

  .page-tabs-bar {
    padding: 6px 12px 0;
  }

  .page-body {
    padding: 12px;
    overflow: visible;
  }

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

  .table-filter {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .page-body {
    padding: 10px;
  }

  .page-tabs-shell button {
    min-width: 108px;
    padding: 0 14px;
  }

  .table-filter {
    grid-template-columns: 1fr;
  }
}

/* ChatKnow framework pass */
.shell {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-rows: 52px minmax(0, 1fr);
  overflow: hidden;
  background: var(--bg);
}

.app-header {
  grid-column: 1 / -1;
  grid-row: 1;
  height: 52px;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #fff;
  z-index: 20;
}

.header-logo {
  width: 200px;
  height: 52px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  background:
    url("/images/sidebar/menu_top-izRC-aIg.png") center center / contain no-repeat,
    linear-gradient(90deg, var(--primary), var(--primary-2));
}

.header-logo .brand {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
}

.header-logo .brand img {
  width: 132px;
  height: 34px;
  object-fit: contain;
  object-position: left center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.header-fill {
  min-width: 0;
}

.app-header .top-actions {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 0 12px;
}

.header-tool,
.app-header .secondary,
.top-chip {
  min-height: 32px;
  height: 32px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 400;
}

.header-tool {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  padding: 0 8px;
  background: transparent;
  color: var(--primary);
}

.header-tool:hover {
  color: var(--ink);
  background: transparent;
}

.safe-tool::before {
  content: "◇";
  font-size: 14px;
  line-height: 1;
}

.top-chip {
  border-color: #e5e6eb;
  background: #f7f8fa;
  color: var(--muted);
}

.side {
  position: relative;
  top: auto;
  grid-column: 1;
  grid-row: 2;
  width: 200px;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 56px;
  overflow: visible;
  background:
    url("/images/sidebar/menu_content-BmKzXIgB.png") center center / contain no-repeat,
    linear-gradient(90deg, var(--primary), var(--primary-2));
}

.side-scroll {
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding: 10px 10px 10px;
  scrollbar-width: none;
}

.side-scroll::-webkit-scrollbar {
  display: none;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-group {
  display: grid;
  gap: 2px;
}

.nav-section {
  padding: 10px 10px 5px;
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
  font-weight: 400;
}

.nav button {
  position: relative;
  width: 180px;
  height: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  border: 0;
  border-radius: 4px;
  padding: 0 10px;
  background: transparent;
  color: rgba(255, 255, 255, .9);
  font-size: 14px;
  font-weight: 400;
  text-align: left;
}

.nav button:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.nav button.active {
  background: rgb(25, 135, 53);
  color: #fff;
}

.nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: #fff;
}

.nav-dot {
  width: 16px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, .92);
  font-size: 12px;
  font-weight: 400;
}

.side-status {
  height: 44px;
  display: grid;
  gap: 2px;
  margin: 0 10px 12px;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(11, 96, 42, .34);
}

.main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.global-tabs-bar {
  flex: 0 0 auto;
  height: 40px;
  margin-left: 1px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.global-tabs-shell {
  height: 40px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 20px 0;
  scrollbar-width: none;
}

.global-tabs-shell::-webkit-scrollbar {
  display: none;
}

.global-tabs-shell button {
  height: 30px;
  min-width: 88px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-bottom-color: var(--line);
  border-radius: 8px 8px 0 0;
  padding: 0 14px;
  background: #f7f8fa;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.global-tabs-shell button:hover,
.global-tabs-shell button.active {
  color: var(--primary);
}

.global-tabs-shell button.active {
  border-bottom-color: #fff;
  background: #fff;
  font-weight: 500;
}

.content {
  min-width: 0;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: 1px;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.page-frame {
  min-width: 0;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.page-tabs-bar {
  flex: 0 0 auto;
  min-height: 0;
  padding: 0;
  border-bottom: 0;
  background: #fff;
}

.page-tabs-shell {
  height: 32px;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.page-tabs-shell::-webkit-scrollbar {
  display: none;
}

.page-tabs-shell button {
  height: 28px;
  min-width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 12px;
  background: #f7f8fa;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.page-tabs-shell button:hover,
.page-tabs-shell button.active {
  color: var(--primary);
}

.page-tabs-shell button.active {
  border-color: #cfe8d6;
  background: #f1fbf4;
  font-weight: 500;
}

.page-tabs-shell button i {
  display: none;
}

.page-body {
  min-width: 0;
  min-height: 0;
  flex: 1;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px 20px;
  overflow: auto;
  background: #fff;
}

.page-heading {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
}

.page-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.page-intro {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.page-intro p {
  color: var(--muted);
  font-size: 13px;
}

.panel,
.card,
.head {
  border-radius: 4px;
  box-shadow: none;
}

.panel {
  border: 1px solid var(--line);
  background: #fff;
}

.table-filter {
  padding: 10px 20px 10px;
  background: #f2f3f5;
}

.table {
  margin: 16px;
}

@media (max-width: 900px) {
  .shell {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    overflow: visible;
  }

  .app-header {
    grid-column: 1;
    grid-template-columns: 1fr;
    height: auto;
  }

  .header-logo {
    width: 100%;
  }

  .header-fill {
    display: none;
  }

  .app-header .top-actions {
    height: auto;
    flex-wrap: wrap;
    padding: 8px 12px 10px;
  }

  .side,
  .main {
    grid-column: 1;
    grid-row: auto;
  }

  .side {
    width: 100%;
    height: auto;
    grid-template-rows: auto auto;
  }

  .side-scroll {
    padding: 10px;
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .nav-group {
    min-width: 172px;
  }

  .global-tabs-bar,
  .content {
    margin-left: 0;
  }

  .page-body {
    padding: 14px 12px;
    overflow: visible;
  }
}

/* Dashboard refinement */
.dashboard-page,
.dashboard-page .page-body {
  background: #f5f6f7;
}

.dashboard-page .page-body {
  gap: 12px;
  padding: 8px 18px 20px;
}

.dashboard-page .page-body > .dashboard-cards:first-child {
  margin-top: 0;
}

.dashboard-page .page-tabs-bar {
  margin-top: 0;
}

.dashboard-page .page-tabs-shell {
  min-height: 34px;
}

.dashboard-page .page-tabs-shell button {
  height: 34px;
  min-width: 118px;
  padding: 0 18px;
}

.dashboard-page .page-heading {
  min-height: 0;
}

.client-integration-page .page-tabs-bar {
  min-height: 40px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  overflow: visible;
}

.client-integration-page .page-tabs-shell {
  min-height: 40px;
  align-items: center;
}

.client-integration-page .page-body {
  gap: 16px;
  padding-top: 20px;
}

.client-integration-page .api-groups,
.client-integration-page .api-doc-tree {
  margin-top: 0;
}

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

.dashboard-cards .card {
  min-height: 92px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 14px 15px;
  border-color: #e1e4e8;
  background: #fff;
}

.dashboard-cards .card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--primary);
  opacity: .72;
}

.dashboard-cards .card span {
  color: #68717d;
  font-size: 12px;
  font-weight: 400;
}

.dashboard-cards .card b {
  margin: 0;
  overflow: hidden;
  color: #1d2129;
  font-size: 22px;
  line-height: 1.12;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-cards .card em {
  margin: 0;
  overflow: hidden;
  color: #8a929e;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 12px;
  align-items: stretch;
}

.dashboard-overview .panel,
.dashboard-main-grid .panel {
  border-color: #e1e4e8;
}

.dashboard-overview .panel-title,
.dashboard-main-grid .panel-title {
  min-height: 42px;
  padding: 0 15px;
  font-size: 14px;
  font-weight: 500;
}

.dashboard-overview .meter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.dashboard-overview .meter-panel,
.dashboard-overview .meter-card,
.dashboard-overview .ops-summary > div {
  border-color: #e5e6eb;
  background: #fbfcfd;
}

.dashboard-overview .ops-summary {
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px;
}

.dashboard-overview .ops-summary > div {
  min-height: 66px;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(260px, .42fr);
  gap: 10px;
  align-items: start;
}

.dashboard-client-panel {
  min-height: 0;
}

.dashboard-client-panel .panel-title span {
  flex: 1;
}

.dashboard-client-panel .table {
  margin: 0;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-client-panel table {
  min-width: 100%;
  table-layout: fixed;
}

.dashboard-client-panel th,
.dashboard-client-panel td {
  padding: 9px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-client-panel th:nth-child(1),
.dashboard-client-panel td:nth-child(1) {
  width: 118px;
}

.dashboard-client-panel th:nth-child(2),
.dashboard-client-panel td:nth-child(2) {
  width: 148px;
}

.dashboard-client-panel th:nth-child(3),
.dashboard-client-panel td:nth-child(3),
.dashboard-client-panel th:nth-child(5),
.dashboard-client-panel td:nth-child(5) {
  width: 74px;
}

.dashboard-client-panel th:nth-child(4),
.dashboard-client-panel td:nth-child(4) {
  width: 132px;
}

.dashboard-client-panel th:nth-child(6),
.dashboard-client-panel td:nth-child(6) {
  width: 142px;
}

.dashboard-client-panel .empty-state {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fbfcfd;
}

.panel-title-note {
  color: var(--faint);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
}

.table-pagination {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: #fbfcfd;
  color: #68717d;
  font-size: 13px;
}

.pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.pagination-actions select {
  width: 112px;
  min-height: 30px;
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: 13px;
}

.pagination-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.live-chat-frame .page-body {
  gap: 0;
  padding: 0;
}

.live-chat-page {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #fff;
}

.live-chat-filter {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.live-chat-filter__bar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 12px;
}

.live-chat-filter__left {
  display: flex;
  align-items: baseline;
  gap: 18px;
  min-width: 0;
}

.live-chat-title {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.live-chat-desc {
  overflow: hidden;
  color: #8b95a5;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-chat-filter__right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.live-chat-icon-btn {
  width: 34px;
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
}

.action-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
}

.live-chat-filter__form {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 12px 24px;
  background: #f5f6f8;
}

.live-chat-filter__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #5f6875;
  font-weight: 650;
}

.live-chat-filter__item > span {
  white-space: nowrap;
}

.live-chat-control {
  width: 170px;
  min-height: 38px;
  border: 0;
  border-radius: 2px;
  background-color: #fff;
}

.live-chat-static-select {
  width: 292px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  padding: 0 12px;
  color: #1f2937;
  font-weight: 600;
}

.filter-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.live-chat-board {
  min-width: 0;
  min-height: 470px;
  height: calc(100vh - 198px);
  display: grid;
  grid-template-columns: minmax(220px, 20%) minmax(220px, 20%) minmax(0, 1fr) minmax(250px, 22%);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #fff;
}

.live-chat-col {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 56px auto minmax(0, 1fr);
  border-right: 1px solid var(--line);
  background: #fff;
}

.live-chat-col--message {
  background: #f1f2f4;
}

.live-chat-col--settings {
  grid-template-rows: 56px minmax(0, 1fr);
}

.live-chat-col__title {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: #1f2937;
  font-size: 16px;
  font-weight: 700;
}

.live-chat-col__tools {
  color: #68717d;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.live-chat-tabs {
  display: inline-flex;
  align-items: center;
  gap: 22px;
}

.live-chat-tabs b {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.live-chat-tabs b.active,
.live-chat-tabs b:first-child {
  border-bottom-color: var(--primary);
  color: #1f2937;
}

.live-chat-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 12px 14px 10px;
}

.live-chat-search input,
.live-chat-search select {
  min-height: 38px;
  border: 0;
  background-color: #f1f2f4;
}

.live-chat-search--combo {
  grid-template-columns: 108px minmax(0, 1fr);
}

.live-chat-search-icon {
  color: #8b95a5;
  font-size: 18px;
}

.live-chat-list,
.live-chat-message-area,
.live-setting-content {
  min-height: 0;
  overflow: auto;
}

.live-chat-account,
.live-chat-session {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid #f0f1f3;
  padding: 10px 14px;
  background: #fff;
  color: #1f2937;
  text-align: left;
}

.live-chat-account:hover,
.live-chat-session:hover,
.live-chat-account.active,
.live-chat-session.active {
  background: #f6fbf7;
}

.live-chat-account > span:last-child,
.live-chat-session > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.live-chat-account b,
.live-chat-session b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-chat-account small,
.live-chat-session small {
  overflow: hidden;
  color: #8b95a5;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-chat-session {
  justify-content: space-between;
}

.live-chat-session em {
  min-width: 24px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eef2f7;
  color: #68717d;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.live-chat-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #a8b0bd;
}

.live-empty-icon {
  width: 46px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #a8b0bd;
  font-size: 34px;
}

.live-chat-message-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.live-chat-bubble {
  max-width: 76%;
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
}

.live-chat-bubble.out {
  align-self: flex-end;
  border-color: #cfe8d6;
  background: #effaf2;
}

.live-chat-bubble__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #8b95a5;
  font-size: 12px;
}

.live-chat-bubble__meta b {
  overflow: hidden;
  color: #1f2937;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-chat-bubble p {
  margin: 0;
  color: #1f2937;
  line-height: 1.6;
  word-break: break-word;
}

.live-setting-content {
  padding: 0 0 20px;
}

.live-setting-section {
  border-bottom: 1px solid #f0f1f3;
}

.live-setting-section__head {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: #1f2937;
  font-weight: 700;
}

.live-setting-section__body {
  display: grid;
  gap: 10px;
  padding: 0 16px 14px;
}

.live-setting-row,
.live-setting-field,
.live-setting-kv {
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(90px, .7fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #4e5969;
}

.live-setting-field select {
  min-height: 38px;
  border: 0;
  background-color: #f1f2f4;
}

.live-setting-kv b {
  overflow: hidden;
  color: #1f2937;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-switch {
  justify-self: end;
  width: 34px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  padding: 2px;
  background: #c7ced8;
}

.live-switch i {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
}

.live-switch.checked {
  background: #22b14c;
}

.live-switch.checked i {
  margin-left: 14px;
}

.chat-records-page {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.chat-records-title {
  min-height: 50px;
}

.chat-records-title small {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.chat-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-only {
  width: 34px;
  padding: 0;
  font-size: 16px;
}

.chat-records-filter {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 140px 140px auto auto;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.chat-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  gap: 10px;
}

.summary-item {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 12px;
  background: #fff;
}

.summary-item span {
  color: var(--muted);
  font-size: 12px;
}

.summary-item strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.chat-records-table-panel {
  overflow: hidden;
}

.chat-records-table-wrap {
  width: calc(100% - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 16px;
  background: #fff;
}

.chat-records-table {
  min-width: 1380px;
  table-layout: fixed;
}

.chat-records-table th:nth-child(1),
.chat-records-table td:nth-child(1) { width: 180px; }
.chat-records-table th:nth-child(2),
.chat-records-table td:nth-child(2) { width: 110px; }
.chat-records-table th:nth-child(3),
.chat-records-table td:nth-child(3) { width: 160px; }
.chat-records-table th:nth-child(4),
.chat-records-table td:nth-child(4) { width: 130px; }
.chat-records-table th:nth-child(5),
.chat-records-table td:nth-child(5) { width: 86px; }
.chat-records-table th:nth-child(6),
.chat-records-table td:nth-child(6) { width: 140px; }
.chat-records-table th:nth-child(7),
.chat-records-table td:nth-child(7) { width: 84px; }
.chat-records-table th:nth-child(8),
.chat-records-table td:nth-child(8) { width: 360px; }
.chat-records-table th:nth-child(9),
.chat-records-table td:nth-child(9) { width: 110px; }
.chat-records-table th:nth-child(10),
.chat-records-table td:nth-child(10) { width: 180px; }

.chat-direction-tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 3px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 650;
}

.chat-direction-tag.in {
  background: #e7f8ed;
  color: #1f7a3b;
}

.chat-direction-tag.out {
  background: #e8f3ff;
  color: #165dff;
}

.status-pill {
  background: #e7f8ed;
  color: #1f7a3b;
}

.chat-content-button {
  width: 100%;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-content-button:hover {
  color: var(--primary);
  text-decoration: underline;
}

.chat-pagination {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 8px 14px;
  background: #fbfcfd;
  color: #68717d;
  font-size: 13px;
}

.chat-record-modal {
  width: min(620px, 100%);
}

.chat-record-detail .detail {
  padding: 0;
}

.chat-record-detail .detail p {
  grid-template-columns: 92px minmax(0, 1fr);
}

.chat-detail-content {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: #fbfcfd;
}

.chat-detail-content span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chat-detail-content p {
  margin: 0;
  color: var(--ink);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-loading {
  margin: 16px;
}

.dashboard-main-grid .detail {
  padding: 2px 14px 10px;
}

.dashboard-main-grid .detail p {
  grid-template-columns: 74px minmax(0, 1fr);
  padding: 9px 0;
  font-size: 12px;
}

@media (max-width: 1380px) {
  .dashboard-overview .meter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .dashboard-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-overview,
  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-page,
  .dashboard-page .page-body {
    background: #f5f6f7;
  }

  .dashboard-page .page-body {
    padding: 12px;
  }

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

  .pagination-actions {
    width: 100%;
  }

  .pagination-actions select {
    flex: 1;
    width: auto;
  }

  .api-doc-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .api-doc-head .primary {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .dashboard-cards,
  .dashboard-overview .meter-grid {
    grid-template-columns: 1fr;
  }

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

  .page-heading-actions {
    width: 100%;
  }

  .page-heading-actions .primary,
  .page-heading-actions .secondary {
    width: 100%;
  }

  .api-doc-lines {
    padding: 14px 12px 18px;
  }

  .api-doc-line {
    font-size: 13px;
  }
}

/* Keep long admin pages readable: the browser page must be able to scroll. */
.shell {
  width: 100%;
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

.main,
.content,
.page-frame {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.page-body {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
}

.side {
  position: sticky;
  top: 52px;
  align-self: start;
  height: calc(100vh - 52px);
}

/* Login page refresh: scoped to the unauthenticated screen only. */
.login-v2 {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(480px, 1fr);
  place-items: stretch;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
}

.login-v2-brand {
  min-height: 100vh;
  padding: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(71, 185, 92, .94), rgba(27, 145, 57, .98)),
    radial-gradient(circle at 72% 32%, rgba(255, 255, 255, .2), transparent 30%);
  color: #fff;
}

.login-v2-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 26px;
  font-weight: 700;
}

.login-v2-symbol {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #fff;
  color: var(--primary);
  font-weight: 800;
}

.login-v2-name {
  letter-spacing: 0;
}

.login-v2-brand h1 {
  margin: 56px 0 16px;
  color: #fff;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.25;
}

.login-v2-brand p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, .88);
  font-size: 16px;
  line-height: 1.7;
}

.login-v2-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 16px;
  margin-top: 42px;
}

.login-v2-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, .94);
  font-size: 14px;
}

.login-v2-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #fff;
}

.login-v2-panel {
  align-self: center;
  justify-self: center;
  width: 400px;
  padding: 40px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}

.login-v2-header {
  margin-bottom: 32px;
}

.login-v2-header h2 {
  margin: 0 0 8px;
  color: #21262c;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.25;
}

.login-v2-header span {
  color: var(--faint);
  font-size: 14px;
}

.login-v2-panel .field {
  margin-bottom: 18px;
  gap: 8px;
}

.login-v2-panel input:not([type="checkbox"]) {
  min-height: 40px;
  border-radius: 2px;
}

.login-v2-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 18px;
  color: var(--muted);
}

.login-v2-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.login-v2-check input {
  width: 14px;
  min-height: 14px;
  margin: 0;
}

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

.login-v2-submit {
  width: 100%;
  height: 40px;
  border-radius: 2px;
}

@media (max-width: 900px) {
  .login-v2 {
    grid-template-columns: 1fr;
  }

  .login-v2-brand {
    display: none;
  }

  .login-v2-panel {
    width: min(400px, calc(100vw - 48px));
  }
}

/* Platform account list */
.platforms-page .page-body {
  gap: 14px;
  padding: 18px 20px;
  background: #fff;
}

.platform-account-page {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.platform-account-head {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.platform-account-head h1 {
  margin: 0;
  color: #1d2129;
  font-size: 18px;
  font-weight: 700;
}

.platform-account-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.platform-icon-btn {
  width: 32px;
  height: 30px;
  min-height: 30px;
  border: 0;
  border-radius: 2px;
  background: #f2f3f5;
  color: #5f6875;
}

.platform-action-divider {
  width: 1px;
  height: 22px;
  background: #e5e6eb;
}

.platform-account-actions .disabled {
  opacity: .46;
  cursor: not-allowed;
}

.platform-account-filter {
  display: grid;
  grid-template-columns: minmax(150px, 190px) 76px minmax(160px, 1fr) minmax(180px, 220px) minmax(160px, 200px) minmax(150px, 190px) auto auto;
  gap: 14px;
  align-items: center;
  padding: 10px 18px;
  background: #f2f3f5;
}

.platform-account-filter input,
.platform-account-filter select {
  min-height: 32px;
  border: 0;
  border-radius: 2px;
  background-color: #fff;
  font-size: 13px;
}

.platform-account-table {
  width: 100%;
  min-height: 146px;
  overflow: auto;
  border: 1px solid #e5e6eb;
  border-radius: 3px;
  background: #fff;
}

.platform-account-table table {
  min-width: 1560px;
  table-layout: fixed;
}

.platform-account-table th,
.platform-account-table td {
  height: 46px;
  padding: 10px 14px;
  font-size: 13px;
}

.platform-account-table th {
  background: #f2f3f5;
  font-weight: 650;
}

.platform-account-table .platform-check {
  width: 48px;
  text-align: center;
}

.platform-account-table input[type="checkbox"],
.platform-permission-table input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
  padding: 0;
  border-radius: 2px;
  vertical-align: middle;
  appearance: auto;
}

.platform-account-table th:nth-child(2),
.platform-account-table td:nth-child(2) { width: 260px; }
.platform-account-table th:nth-child(3),
.platform-account-table td:nth-child(3) { width: 170px; }
.platform-account-table th:nth-child(4),
.platform-account-table td:nth-child(4) { width: 190px; }
.platform-account-table th:nth-child(5),
.platform-account-table td:nth-child(5) { width: 220px; }
.platform-account-table th:nth-child(6),
.platform-account-table td:nth-child(6) { width: 170px; }
.platform-account-table th:nth-child(7),
.platform-account-table td:nth-child(7) { width: 170px; }
.platform-account-table th:nth-child(8),
.platform-account-table td:nth-child(8) { width: 170px; }
.platform-account-table th:nth-child(9),
.platform-account-table td:nth-child(9) { width: 170px; }
.platform-account-table th:nth-child(10),
.platform-account-table td:nth-child(10) { width: 160px; }

.platform-account-info {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.platform-account-info > span {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.platform-account-info b,
.platform-account-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-account-info small {
  color: #86909c;
  font-size: 12px;
}

.platform-account-ops {
  display: flex;
  align-items: center;
  gap: 8px;
}

.platform-empty {
  min-height: 118px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #a8b0bd;
}

.platform-empty-icon {
  width: 44px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 34px;
}

.platform-permission-page {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.platform-permission-head {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.platform-permission-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.platform-permission-title h1 {
  margin: 0;
  color: #1d2129;
  font-size: 16px;
  font-weight: 700;
}

.platform-permission-title span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  padding: 0 8px;
  background: #f2f3f5;
  color: #4e5969;
  font-size: 12px;
  font-weight: 700;
}

.platform-permission-filter {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(260px, 1fr) minmax(150px, 190px) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  background: #f2f3f5;
}

.platform-permission-filter input,
.platform-permission-filter select {
  min-height: 32px;
  border: 0;
  border-radius: 2px;
  background-color: #fff;
  font-size: 13px;
}

.platform-permission-table {
  width: 100%;
  overflow: auto;
  border: 1px solid #e5e6eb;
  border-radius: 3px;
  background: #fff;
}

.platform-permission-table table {
  min-width: 980px;
  table-layout: fixed;
}

.platform-permission-table th,
.platform-permission-table td {
  height: 46px;
  padding: 10px 16px;
  font-size: 13px;
}

.platform-permission-table th {
  background: #f2f3f5;
  font-weight: 650;
}

.platform-permission-table th:nth-child(1),
.platform-permission-table td:nth-child(1) { width: 220px; }
.platform-permission-table th:nth-child(2),
.platform-permission-table td:nth-child(2) { width: 360px; }
.platform-permission-table th:nth-child(3),
.platform-permission-table td:nth-child(3) { width: 220px; }
.platform-permission-table th:nth-child(4),
.platform-permission-table td:nth-child(4) { width: 180px; }
.platform-permission-table th:nth-child(5),
.platform-permission-table td:nth-child(5) { width: 180px; }

.platform-permission-ops {
  display: flex;
  align-items: center;
  gap: 10px;
}
