:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --sidebar: #ffffff;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #6b7280;
  --soft: #f6f8fc;
  --line: #e5eaf3;
  --blue: #2f73ff;
  --blue-soft: #eef5ff;
  --red: #d94b63;
  --gold: #a87513;
  --shadow: 0 10px 30px rgba(35, 52, 84, 0.06);
}
/* 1.5.47 能力商店 */
.capability-store-summary {
  display: grid;
  grid-template-columns: minmax(150px, .4fr) minmax(280px, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #dfe8f5;
  border-radius: 12px;
  background: #f7faff;
}

.capability-store-summary > div { display: grid; gap: 4px; }
.capability-store-summary span { color: #64748b; font-size: 12px; font-weight: 800; }
.capability-store-summary strong { color: #12366f; font-size: 26px; line-height: 1; }
.capability-store-summary p { margin: 0; color: #5b6b80; font-size: 13px; line-height: 1.65; }

.capability-store-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.capability-product-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #dfe7f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(30, 64, 175, .05);
}
.capability-product-card.owned { border-color: #a9c8ff; background: linear-gradient(145deg, #fff, #f4f8ff); }
.capability-product-card header { display: grid; gap: 8px; }
.capability-product-card header span { width: fit-content; padding: 4px 8px; border-radius: 999px; background: #eef3fa; color: #58697e; font-size: 11px; font-weight: 900; }
.capability-product-card.owned header span { background: #e4efff; color: #1764d7; }
.capability-product-card header strong { color: #172033; font-size: 17px; }
.capability-product-card > p { min-height: 42px; margin: 0; color: #66758a; font-size: 13px; line-height: 1.6; }
.capability-product-price { display: flex; align-items: baseline; gap: 7px; }
.capability-product-price strong { color: #143a78; font-size: 25px; }
.capability-product-price span { color: #7b8798; font-size: 12px; }
.capability-quota { display: grid; gap: 8px; }
.capability-quota > div { display: flex; justify-content: space-between; gap: 12px; color: #65758b; font-size: 12px; }
.capability-quota em { color: #36598c; font-style: normal; font-weight: 800; }
.capability-quota > i { height: 6px; overflow: hidden; border-radius: 999px; background: #e7edf5; }
.capability-quota > i b { display: block; height: 100%; border-radius: inherit; background: #3276e8; }
.capability-product-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 3px; }
.capability-product-card footer small { color: #718096; line-height: 1.45; }

.capability-admin-list { display: grid; gap: 10px; }
.capability-admin-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(118px, .55fr));
  gap: 12px;
  align-items: end;
  padding: 15px;
  border: 1px solid #dfe7f1;
  border-radius: 12px;
  background: #fff;
}
.capability-admin-copy { display: grid; gap: 5px; align-self: center; }
.capability-admin-copy strong { color: #18243a; font-size: 15px; }
.capability-admin-copy span { color: #6f7d91; font-size: 12px; line-height: 1.5; }
.capability-admin-row label { display: grid; gap: 6px; }
.capability-admin-row label > span { color: #5f6f84; font-size: 12px; font-weight: 800; }
.capability-admin-row input,
.capability-admin-row select { width: 100%; min-height: 40px; border: 1px solid #d9e2ef; border-radius: 8px; padding: 0 10px; background: #fbfdff; color: #1f2b3d; }

@media (max-width: 980px) {
  .capability-admin-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capability-admin-copy { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .capability-store-summary { grid-template-columns: 1fr; }
  .capability-store-summary button { justify-self: start; }
  .capability-store-grid,
  .capability-admin-row { grid-template-columns: 1fr; }
  .capability-product-card footer { align-items: stretch; flex-direction: column; }
}

/* 角色 / 场景管理与网站设置中的兑换码管理 */
.admin-access-page { padding: 0; overflow: hidden; }
.admin-access-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 24px 26px 18px; border-bottom: 1px solid #dbe7f7; background: linear-gradient(135deg, #f7fbff, #eef5ff); }
.admin-access-header > div > span, .redemption-panel-title > span, .redemption-list-head span { color: #2f72eb; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.admin-access-header h2, .redemption-panel-title h3, .redemption-list-head h3 { margin: 5px 0 4px; color: #13223c; }
.admin-access-header p, .redemption-panel-title p { margin: 0; color: #72819a; font-size: 13px; }
.admin-access-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid #cfdef4; border-radius: 12px; background: rgba(255,255,255,.78); }
.admin-access-tabs button { border: 0; border-radius: 9px; padding: 9px 15px; color: #66758d; background: transparent; font: inherit; font-weight: 700; cursor: pointer; }
.admin-access-tabs button.active { color: #1768e5; background: #fff; box-shadow: 0 4px 12px rgba(39,99,190,.12); }
.admin-access-page [data-admin-access-content] { padding: 22px; }

.redemption-admin-layout { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(440px, 1.2fr); gap: 20px; align-items: start; }
.site-settings-redemption-section .redemption-admin-layout { margin-top: 18px; }
.redemption-generator, .redemption-list-panel { border: 1px solid #d9e5f6; border-radius: 16px; background: #fff; padding: 20px; box-shadow: 0 10px 28px rgba(55,92,143,.06); }
.redemption-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.redemption-form-grid label { display: grid; gap: 7px; color: #62728b; font-size: 12px; font-weight: 700; }
.redemption-form-grid input, .account-redemption-row input { width: 100%; box-sizing: border-box; border: 1px solid #cad9ef; border-radius: 10px; padding: 11px 12px; color: #14233d; background: #f9fbff; font: inherit; }
.redemption-result { display: grid; gap: 10px; margin-top: 16px; padding: 14px; border: 1px solid #bcd4fb; border-radius: 12px; background: #f3f8ff; }
.redemption-result > div { display: grid; gap: 3px; color: #536580; font-size: 12px; }
.redemption-result textarea { min-height: 120px; resize: vertical; border: 1px solid #c5d7f2; border-radius: 9px; padding: 10px; color: #17345e; background: #fff; font: 600 13px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; }
.redemption-list-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.redemption-code-list { display: grid; gap: 10px; max-height: 680px; overflow: auto; }
.redemption-code-item { border: 1px solid #dae5f5; border-radius: 13px; padding: 13px; background: #fbfdff; }
.redemption-code-item.void, .redemption-code-item.expired, .redemption-code-item.exhausted { background: #f7f8fa; opacity: .82; }
.redemption-code-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.redemption-code-pill { display: inline-flex; align-items: center; min-width: 0; padding: 5px 6px 5px 12px; border-radius: 18px; background: #f0f2f5; }
.redemption-code-pill code { min-width: 180px; color: #1d2838; font: 600 13px ui-monospace, SFMono-Regular, Menlo, monospace; }
.redemption-code-pill button { width: 29px; height: 29px; border: 0; border-radius: 50%; color: #697386; background: transparent; cursor: pointer; }
.redemption-code-pill button:hover:not(:disabled) { color: #1768e5; background: #fff; }
.redemption-code-pill button:disabled { opacity: .3; cursor: default; }
.redemption-status { flex: none; border-radius: 999px; padding: 5px 9px; color: #58708d; background: #eaf0f7; font-size: 11px; font-weight: 800; }
.redemption-status.active { color: #15805b; background: #e5f8ef; }
.redemption-code-meta { display: flex; flex-wrap: wrap; gap: 7px 13px; margin-top: 10px; color: #718097; font-size: 12px; }
.redemption-audit { margin-top: 10px; border-top: 1px solid #e4ebf5; padding-top: 8px; color: #53657f; font-size: 12px; }
.redemption-audit summary { cursor: pointer; font-weight: 700; }
.redemption-audit p { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 0; }
.redemption-audit p span { color: #7c899d; text-align: right; }
.redemption-audit-empty { margin-top: 9px; color: #9aa6b7; font-size: 12px; }
.redemption-code-actions { display: flex; justify-content: flex-end; margin-top: 9px; }
.redemption-code-actions:empty { display: none; }
.redemption-code-actions .danger-button { padding: 6px 10px; font-size: 11px; }

.account-redemption-card { display: grid; gap: 12px; margin-top: 18px; padding: 16px; border: 1px solid #cfe0f7; border-radius: 14px; background: linear-gradient(135deg, #f7fbff, #f2f7ff); }
.account-redemption-card > div:first-child { display: grid; gap: 4px; }
.account-redemption-card > div:first-child span, .account-redemption-card small { color: #718099; font-size: 12px; }
.account-redemption-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.account-redemption-row input { text-transform: uppercase; letter-spacing: .06em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 900px) {
  .admin-access-header { align-items: stretch; flex-direction: column; }
  .admin-access-tabs { align-self: stretch; overflow-x: auto; }
  .admin-access-tabs button { flex: 1 0 auto; }
  .redemption-admin-layout { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .admin-access-page [data-admin-access-content], .admin-access-header { padding: 14px; }
  .redemption-form-grid { grid-template-columns: 1fr; }
  .redemption-code-main, .redemption-audit p { align-items: flex-start; flex-direction: column; }
  .redemption-code-pill { width: 100%; box-sizing: border-box; }
  .redemption-code-pill code { min-width: 0; flex: 1; }
  .account-redemption-row { grid-template-columns: 1fr; }
}

.device-limit-panel {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  background: rgba(255, 251, 235, 0.92);
}

.device-limit-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.device-limit-heading strong { color: #92400e; font-size: 16px; }
.device-limit-heading span { color: #78716c; font-size: 13px; }
.device-limit-list, .account-device-list { display: grid; gap: 8px; }

.account-device-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.account-device-card:has(> label) { grid-template-columns: 20px minmax(0, 1fr); }
.account-device-card.selected { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12); }
.account-device-card .device-main { display: grid; gap: 5px; min-width: 0; }
.account-device-card strong { color: #111827; }
.account-device-card span, .account-device-card p { color: #6b7280; font-size: 12px; line-height: 1.55; }
.account-device-card .device-title-row,
.account-device-card .device-meta-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.account-device-card .device-title-row { justify-content: space-between; }
.account-device-card .device-meta-row { flex-wrap: wrap; }
.account-device-card .device-current-badge { padding: 1px 7px; border-radius: 999px; background: #eaf2ff; color: #2563eb; font-size: 11px; }
.account-device-card .device-card-revoke-button { min-height: 30px; margin-left: 0; padding: 4px 10px; white-space: nowrap; }
.device-limit-panel .account-device-card:has(> label) {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
}
.device-limit-panel .device-select-control {
  display: grid;
  min-height: 30px;
  place-items: center;
}
.device-limit-panel .device-limit-revoke-button { min-height: 34px; padding-block: 6px; }
.account-device-section { grid-column: 1 / -1; }

.admin-user-device-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f8fafc;
}

.admin-user-device-panel > div:first-child { display: flex; justify-content: space-between; gap: 12px; }
.admin-user-device-panel > div:first-child span { color: #64748b; font-size: 13px; }

@media (max-width: 720px) {
  .account-device-card:has(> label) { grid-template-columns: 20px minmax(0, 1fr); }
  .account-device-card .device-meta-row { gap: 6px; }
  .device-limit-panel .login-submit, .device-limit-panel .secondary-button { min-height: 44px; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-toast {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 1200;
  max-width: min(360px, calc(100vw - 32px));
  border: 1px solid #bcd5ff;
  border-radius: 8px;
  padding: 13px 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 18px 46px rgba(30, 58, 95, 0.16);
  font-size: 14px;
  font-weight: 950;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.app-toast.error {
  border-color: #ffb9c6;
  background: #fff5f7;
  color: #b4233d;
  box-shadow: 0 18px 46px rgba(180, 35, 61, 0.2);
}

.stale-frontend-notice {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 1250;
  display: flex;
  width: min(760px, calc(100vw - 32px));
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(47, 115, 255, 0.3);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 54px rgba(30, 58, 95, 0.2);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.stale-frontend-notice div {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.stale-frontend-notice strong {
  color: var(--ink);
  font-size: 14px;
}

.stale-frontend-notice span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.stale-frontend-notice button {
  flex: 0 0 auto;
  border: 1px solid #cbdcff;
  border-radius: 9px;
  padding: 9px 12px;
  background: #fff;
  color: #2f73ff;
  font-size: 12px;
  font-weight: 850;
}

.stale-frontend-notice button:last-child {
  border-color: #2f73ff;
  background: #2f73ff;
  color: #fff;
}

@media (max-width: 720px) {
  .stale-frontend-notice {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .stale-frontend-notice div {
    flex-basis: 100%;
  }

}

.login-page {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(420px, 0.86fr);
  min-height: 100vh;
  background: #eef4ff;
}

.login-visual {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 100vh;
  padding: clamp(38px, 7vw, 90px);
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 28%, rgba(255, 255, 255, 0.2), transparent 24%),
    linear-gradient(135deg, #2f73ff 0%, #437dff 52%, #2563eb 100%);
  color: #fff;
  transition: background 0.24s ease;
}

.login-page.admin-login-page .login-visual {
  background:
    radial-gradient(circle at 74% 22%, rgba(34, 211, 238, 0.32), transparent 24%),
    radial-gradient(circle at 20% 78%, rgba(16, 185, 129, 0.2), transparent 26%),
    linear-gradient(135deg, #071123 0%, #102a56 48%, #102f78 100%);
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 96px 96px;
  opacity: 0.35;
}

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

.login-visual h1 {
  max-width: 620px;
  margin: 72px 0 18px;
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.04;
}

.login-visual p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.8;
}

.login-orbits {
  position: absolute;
  right: 10%;
  bottom: 10%;
  width: 260px;
  height: 260px;
}

.front-login-benefits,
.admin-login-metrics {
  display: none;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
  max-width: 560px;
  margin-top: 32px;
}

.front-login-benefits {
  display: grid;
}

.login-page.admin-login-page .front-login-benefits {
  display: none;
}

.front-login-benefits article,
.admin-login-metrics article {
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.front-login-benefits span,
.front-login-benefits strong,
.admin-login-metrics span,
.admin-login-metrics em {
  display: block;
  color: rgba(232, 246, 255, 0.72);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.front-login-benefits strong {
  margin-top: 7px;
  color: #fff;
  font-size: 16px;
}

.admin-login-metrics strong {
  display: block;
  margin: 6px 0;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.login-page.admin-login-page .admin-login-metrics {
  display: grid;
}

.login-orbits span {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
}

.login-orbits span:nth-child(1) {
  inset: 0;
}

.login-orbits span:nth-child(2) {
  inset: 44px;
}

.login-orbits span:nth-child(3) {
  inset: 96px;
  background: rgba(255, 255, 255, 0.14);
}

.login-panel {
  display: grid;
  align-items: center;
  min-height: 100vh;
  padding: 42px clamp(28px, 7vw, 88px);
}

.login-card {
  position: relative;
  display: grid;
  width: min(100%, 466px);
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-page.admin-login-page .login-card {
  overflow: hidden;
  border-color: rgba(96, 165, 250, 0.42);
  background:
    linear-gradient(rgba(47, 115, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 115, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 92% 0%, rgba(34, 211, 238, 0.22), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  background-size: 28px 28px, 28px 28px, auto, auto;
  box-shadow:
    0 28px 90px rgba(15, 23, 42, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.login-page.admin-login-page .login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #2f73ff, #22d3ee, #10b981, #2f73ff);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.45);
}

.front-auth-only,
.admin-auth-only {
  display: none;
}

.login-page.front-login-page .front-auth-only {
  display: flex;
}

.login-page.admin-login-page .admin-auth-only {
  display: flex;
}

.front-login-chip,
.admin-login-chip {
  align-items: center;
  gap: 8px;
  width: max-content;
  border: 1px solid #d7e5ff;
  border-radius: 999px;
  padding: 7px 11px;
  background: #f3f8ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.login-page.admin-login-page .admin-login-chip {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(239, 248, 255, 0.86);
  color: #1d4ed8;
  letter-spacing: 0.04em;
}

.front-login-chip {
  border-color: #c7f0df;
  background: #f2fff7;
  color: #158052;
}

.front-login-chip span,
.admin-login-chip span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.13);
}

.admin-login-safe {
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #dfe9fb;
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(47, 115, 255, 0.08), rgba(34, 211, 238, 0.08));
}

.admin-login-safe span {
  flex: 0 0 auto;
  border-radius: 6px;
  padding: 5px 8px;
  background: #e8f1ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.admin-login-safe em {
  color: #536276;
  font-size: 13px;
  font-style: normal;
  line-height: 1.65;
}

.login-page.admin-login-page .login-kicker,
.login-page.admin-login-page .admin-login-safe,
.login-page.admin-login-page #loginRoleLabel {
  display: none;
}

.admin-login-audit {
  justify-content: space-between;
  gap: 8px;
}

.admin-login-audit span {
  flex: 1;
  border: 1px solid #e0e9f7;
  border-radius: 6px;
  padding: 8px 6px;
  background: #f8fbff;
  color: #5c6d84;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.login-brand {
  height: auto;
  padding: 0;
  color: #fff;
}

.login-page.admin-login-page .login-brand {
  color: #f8fbff;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

.login-page.admin-login-page .login-brand .brand-icon {
  background: rgba(248, 251, 255, 0.96);
  color: #0f2b5f;
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.28), 0 18px 34px rgba(0, 0, 0, 0.22);
}

.login-card h1 {
  margin: 0;
  font-size: 28px;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

#loginHint {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fbff;
}

#loginHint.success {
  border-color: #bfe8d1;
  background: #f2fff7;
  color: #158052;
}

#loginHint.warning {
  border-color: #ffe1a8;
  background: #fff9ec;
  color: #96630f;
}

#loginHint.error {
  border-color: #ffd0d0;
  background: #fff7f7;
  color: #c24141;
}

.login-kicker {
  color: var(--blue) !important;
  font-size: 11px;
  font-weight: 900;
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.login-tabs button {
  height: 36px;
  border: 0;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.login-tabs button.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
}

.login-page.admin-login-page .login-tabs {
  display: none;
}

.login-page.admin-login-page .login-links {
  display: none;
}

.login-page.admin-login-page #loginRoleLabel.admin-locked select {
  color: var(--blue);
  background: #f3f8ff;
  font-weight: 900;
}

.login-page.admin-login-page .login-card h1 {
  font-size: 26px;
  letter-spacing: 0;
}

.login-page.admin-login-page #loginHint {
  border-color: rgba(34, 211, 238, 0.18);
  background: rgba(241, 248, 255, 0.72);
  color: #536276;
}

.login-card label,
.settings-grid label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}

.settings-grid .readonly-setting {
  min-height: 76px;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.settings-grid .readonly-setting strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.login-card input,
.login-card select,
.settings-grid input,
.settings-grid select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
  font-size: 13px;
}

.sms-code-row,
.sms-admin-test-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.sms-code-row button,
.sms-admin-test-row button {
  min-width: 112px;
  height: 38px;
  border: 1px solid #c9dcfb;
  border-radius: 6px;
  padding: 0 12px;
  background: #f4f8ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.sms-code-row button:disabled,
.sms-admin-test-row button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.sms-admin-test-row .secondary-button {
  margin: 0;
}

.industry-combo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
}

.industry-combo input,
.industry-combo select {
  min-width: 0;
}

.account-manage-layout {
  display: grid;
  gap: 14px;
}

.account-profile-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 21px 18px 18px;
  background:
    linear-gradient(135deg, rgba(47, 115, 255, 0.1), rgba(34, 193, 255, 0.05)),
    #fff;
}

.account-profile-hero::before,
.account-stat-grid article::before,
.account-section-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 5px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #7c3cff, #2f73ff, #23c6e8);
}

.account-profile-hero > div:first-child {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2f73ff, #22c1ff);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  overflow: hidden;
}

.account-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center center;
}

.account-avatar-upload {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  color: #2f73ff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.account-avatar-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.account-avatar-upload span {
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  padding: 4px 9px;
  background: #f4f8ff;
}

.account-profile-hero h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.account-profile-hero p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.account-hero-actions,
.account-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

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

.account-stat-grid article {
  position: relative;
  display: grid;
  gap: 5px;
  overflow: hidden;
  border: 1px solid #dfe8f8;
  border-radius: 8px;
  padding: 15px 12px 12px;
  background: #fbfdff;
}

.account-stat-grid span,
.account-security-list span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.account-stat-grid strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
}

.account-stat-grid em,
.account-section-title span,
.account-card-actions span {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.account-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.account-section-card {
  position: relative;
  display: grid;
  gap: 14px;
  overflow: hidden;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 19px 16px 16px;
  background: #fff;
}

.account-section-card.full {
  grid-column: 1 / -1;
}

.account-section-title {
  display: grid;
  gap: 4px;
}

.account-section-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.account-form-grid .wide {
  grid-column: 1 / -1;
}

.account-security-list {
  display: grid;
  gap: 8px;
}

.account-security-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7faff;
}

.account-security-list strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.login-submit {
  height: 36px;
  border: 0;
  border-radius: 6px;
  font-size: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.login-page.admin-login-page .login-submit {
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.2), 0 0 0 1px rgba(125, 211, 252, 0.22) inset;
}

.account-expired-banner {
  position: fixed;
  top: 14px;
  left: calc(var(--sidebar) + 18px);
  right: 18px;
  z-index: 950;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #ffd0d0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff7f7;
  color: #9f2525;
  box-shadow: 0 14px 34px rgba(159, 37, 37, 0.12);
}

.sidebar-collapsed .account-expired-banner {
  left: 86px;
}

.account-expired-banner strong {
  flex: 0 0 auto;
  color: #b42318;
  font-size: 14px;
  font-weight: 900;
}

.account-expired-banner span {
  flex: 1;
  color: #7f1d1d;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.account-expired-banner button {
  flex: 0 0 auto;
  height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.account-expired-mode .page-view:not(.hidden) {
  padding-top: 56px;
}

.login-options,
.login-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.login-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4b5563;
  font-size: 11px;
  font-weight: 500;
}

.login-options input[type="checkbox"] {
  width: 13px;
  height: 13px;
}

.login-options button,
.login-links button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
}

.login-page.admin-login-page .login-options button,
.login-page.admin-login-page .login-options label {
  font-size: 10px;
}

.login-links {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

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

.app-layout.sidebar-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.app-layout.sidebar-collapsed .sidebar {
  display: none;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: none;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  border-right: 1px solid rgba(125, 211, 252, 0.18);
  background:
    radial-gradient(circle at 10% 0%, rgba(47, 115, 255, 0.22), transparent 32%),
    linear-gradient(180deg, #081426 0%, #0f1e38 58%, #111827 100%);
  color: #eaf4ff;
}

.app-layout.admin-console-mode {
  grid-template-columns: 244px minmax(0, 1fr);
  background: #eef4fb;
}

.app-layout.admin-console-mode .sidebar {
  display: none;
}

.app-layout.admin-console-mode .admin-sidebar {
  display: flex;
}

.admin-brand {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 18px;
  color: #fff;
  text-decoration: none;
}

.admin-brand .brand-icon {
  background: linear-gradient(135deg, #2f73ff, #22d3ee);
  box-shadow: 0 14px 34px rgba(47, 115, 255, 0.34);
}

.admin-brand strong,
.admin-brand em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-brand strong {
  font-size: 18px;
}

.admin-brand em {
  margin-top: 3px;
  color: #8db3da;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.admin-menu {
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 215, 255, 0.34) transparent;
}

.admin-menu::-webkit-scrollbar { width: 5px; }
.admin-menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(99, 215, 255, 0.34);
}

.admin-menu-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  color: #b7c8dc;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.admin-menu-item span {
  color: #63d7ff;
}

.admin-menu-item:hover,
.admin-menu-item.active {
  border-color: rgba(125, 211, 252, 0.24);
  background: linear-gradient(90deg, rgba(47, 115, 255, 0.28), rgba(34, 211, 238, 0.12));
  color: #fff;
}

.admin-sidebar-foot {
  margin-top: auto;
  border-top: 1px solid rgba(125, 211, 252, 0.16);
  padding: 16px 18px;
}

.admin-sidebar-foot span,
.admin-sidebar-foot strong {
  display: block;
}

.admin-sidebar-foot span {
  color: #84a4c6;
  font-size: 12px;
  font-weight: 900;
}

.admin-sidebar-foot strong {
  margin-top: 5px;
  color: #fff;
}

.case-share-action-row {
  display: flex;
  justify-content: flex-end;
  padding: 8px 18px 4px;
}

.group-requirement-shell .case-share-action-row {
  padding: 10px 0 0;
}

.case-share-action-row button {
  white-space: nowrap;
}
.site-case-reward-preview{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 20px;align-items:center;margin-top:18px;border:1px solid #cfe0fb;border-radius:16px;padding:18px 20px;background:linear-gradient(145deg,#f5f9ff,#eaf3ff);color:#5f718b}.site-case-reward-preview>strong{color:#17243a}.site-case-reward-preview>span{grid-row:1/3;grid-column:2;display:flex;align-items:baseline;gap:6px;color:#1769e8;font-weight:800}.site-case-reward-preview>span b{font-size:30px}.site-case-reward-preview>small{font-size:12px;line-height:1.5}
@media(max-width:760px){.site-case-reward-preview{grid-template-columns:1fr}.site-case-reward-preview>span{grid-row:auto;grid-column:auto}}

.chat-history-page-state {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 10px 16px 16px;
  color: #71809a;
  font-size: 13px;
}

.chat-history-page-state.error {
  align-items: center;
  gap: 10px;
  color: #c2415d;
}

.chat-history-media-deferred {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  border: 1px dashed color-mix(in srgb, var(--primary, #2f73ff) 34%, transparent);
  border-radius: 12px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--primary, #2f73ff) 7%, transparent);
  color: var(--muted, #71809a);
  font-size: 12px;
}

.chat-history-media-deferred .secondary-button {
  min-height: 34px;
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .chat-history-media-deferred {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (min-width: 721px) and (max-height: 900px) {
  .admin-brand {
    min-height: 64px;
    padding: 12px 16px;
  }

  .admin-menu {
    gap: 3px;
    padding-block: 4px;
  }

  .admin-menu-item {
    min-height: 38px;
  }

  .admin-sidebar-foot {
    padding: 11px 16px;
  }
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 64px;
  padding: 0 20px;
  color: #111827;
  text-decoration: none;
  font-size: 24px;
  font-weight: 850;
}

.brand-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  background: #111827;
  color: #fff;
  font-size: 15px;
}

.side-menu {
  flex: 1;
  padding: 8px 12px;
  overflow-y: auto;
}

.menu-group {
  margin: 18px 0 7px;
  padding: 0 6px;
  color: #8b95a7;
  font-size: 12px;
}

.menu-item {
  display: flex;
  align-items: center;
  min-height: 38px;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 6px;
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
}

button.menu-item.external-menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.external-menu-item small {
  margin-left: auto;
  color: #8794a8;
  font-size: 13px;
  font-weight: 500;
}

.vpro-external-mark {
  display: inline-grid;
  margin-left: auto;
  place-items: center;
}

.vpro-external-mark svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vpro-nav-icon svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-item:hover,
.menu-item.active {
  background: #f2f6ff;
  color: var(--blue);
}

.menu-item.sub-active {
  background: #eef4ff;
  color: var(--blue);
  font-weight: 700;
}

.menu-icon {
  display: inline-grid;
  width: 16px;
  place-items: center;
  color: currentColor;
  font-size: 13px;
}

.menu-item em,
.menu-item strong {
  margin-left: auto;
  border-radius: 4px;
  padding: 1px 5px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.menu-item strong {
  background: #d77b16;
}

.group-menu-list {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.group-menu-item {
  min-height: 38px;
  padding: 9px 10px;
  font-size: 14px;
}

.group-menu-item span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-menu-empty {
  margin: 6px 0 0 28px;
  color: #a0a9b8;
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.green {
  background: #20b26b;
}

.status-dot.yellow {
  background: #e9c84b;
}

.account-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border-top: 1px solid var(--line);
  color: #4b5563;
  font-size: 13px;
}

.account-box button {
  border: 0;
  background: transparent;
  color: #6b7280;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.app-layout.admin-console-mode .topbar {
  height: 64px;
  background: rgba(248, 251, 255, 0.94);
}

.admin-topbar-title {
  display: none;
  margin-right: auto;
}

.app-layout.admin-console-mode .admin-topbar-title {
  display: block;
}

.admin-topbar-title span,
.admin-topbar-title strong {
  display: block;
}

.admin-topbar-title span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.admin-topbar-title strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 18px;
}

.admin-topbar-extra {
  display: none;
  flex: 1;
  min-width: 0;
  align-items: center;
  margin-left: 18px;
}

.app-layout.admin-console-mode .admin-topbar-extra {
  display: flex;
}

.admin-topbar-extra .model-security-note {
  max-width: 560px;
  margin-right: auto;
}

.admin-topbar-extra .title-actions {
  margin-right: auto;
}

.admin-console-only {
  display: none;
}

.app-layout.admin-console-mode .admin-console-only {
  display: inline-flex;
  align-items: center;
}

.admin-console-primary,
#adminPrimaryActionButton {
  min-width: 112px;
  justify-content: center;
}

.app-layout.admin-console-mode .collapse-button,
.app-layout.admin-console-mode .consult-button,
.app-layout.admin-console-mode #adminPortalButton,
.app-layout.admin-console-mode #roleBadge {
  display: none;
}

.app-layout.admin-console-mode .page-card {
  margin: 22px;
}

.app-layout.showcase-mode {
  grid-template-columns: minmax(0, 1fr);
  background: #020817;
}

.app-layout.showcase-mode .sidebar,
.app-layout.showcase-mode .admin-sidebar,
.app-layout.showcase-mode .topbar {
  display: none;
}

.app-layout.showcase-mode .workspace {
  min-height: 100vh;
}

.app-layout.showcase-mode .page-card {
  margin: 0;
}

.app-layout.chat-view-mode .topbar {
  display: none;
}

.app-layout.group-chat-view-mode .topbar {
  display: none;
}

.collapse-button,
.consult-button,
.login-button,
.create-button,
.secondary-button,
.danger-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #374151;
}

.collapse-button {
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  transition:
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.collapse-button:hover {
  border-color: #c6d8ff;
  color: var(--blue);
  box-shadow: 0 8px 18px rgba(47, 115, 255, 0.1);
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.background-task-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  border: 1px solid #d7e2f2;
  border-radius: 6px;
  padding: 0 9px;
  background: #fff;
  color: #52647d;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.background-task-button em {
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 999px;
  background: #edf3fb;
  color: #52647d;
  font-size: 10px;
  font-style: normal;
}

.background-task-button.has-active {
  border-color: #8fb5ff;
  color: #245fd8;
}

.background-task-button.has-active em {
  background: #2f73ff;
  color: #fff;
}

.background-task-button.has-attention em {
  background: #fff1d6;
  color: #b54708;
}

.background-task-panel {
  position: fixed;
  z-index: 1600;
  top: 64px;
  right: 24px;
  display: flex;
  height: min(680px, calc(100dvh - 88px));
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100dvh - 88px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #cfdbec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(37, 55, 82, 0.2);
}

.background-task-panel.hidden {
  display: none;
}

.background-task-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5ecf5;
  padding: 13px 15px;
  background: #f7faff;
}

.background-task-panel > header div {
  display: grid;
  gap: 2px;
}

.background-task-panel > header span,
.background-task-list section > header {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 900;
}

.background-task-panel > header strong {
  color: #172033;
  font-size: 14px;
}

.background-task-panel > header button {
  width: 30px;
  height: 30px;
  border: 1px solid #d7e2f2;
  border-radius: 6px;
  background: #fff;
  color: #65758b;
  font-size: 20px;
  cursor: pointer;
}

.background-task-panel > header #backgroundTaskClose {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
}

.background-task-panel > header .background-task-panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.background-task-panel > header .background-task-panel-actions #markNotificationReadButton {
  width: auto;
  height: 30px;
  padding: 0 9px;
  color: #2f73ff;
  font-size: 11px;
  font-weight: 800;
}

.background-task-list {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  gap: 12px;
  align-content: start;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 12px 22px;
  scrollbar-gutter: stable;
}

.background-task-list section {
  display: grid;
  gap: 6px;
}

.background-task-list section > header {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
}

.background-task-list section > header em {
  color: #64748b;
  font-style: normal;
}

.background-task-item {
  display: grid;
  gap: 3px;
  width: 100%;
  position: relative;
  border: 1px solid #dde6f2;
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.background-task-item:hover {
  border-color: #9bbcff;
  background: #f8fbff;
}

.background-task-item.active {
  border-left: 3px solid #2f73ff;
}

.background-task-item.attention {
  border-left: 3px solid #dc6803;
}

.background-task-item.notification-employee,
.background-task-item.notification-membership {
  border-left: 3px solid #dc6803;
}

.background-task-item.notification-announcement {
  border-left: 3px solid #7c3aed;
}

.background-task-item.notification-info {
  border-left: 3px solid #0f9c91;
}

.background-task-item.notification-error {
  border-left: 3px solid #df3d55;
}

.background-task-item.unread {
  border-color: #a9c8ff;
  background: linear-gradient(135deg, #f1f7ff 0%, #fbfdff 100%);
  box-shadow: 0 5px 14px rgba(47, 115, 255, 0.09);
}

.background-task-item.read {
  background: #fff;
}

.notice-new,
.notice-read {
  position: absolute;
  top: 9px;
  right: 10px;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
}

.notice-new {
  background: #2f73ff;
  color: #fff;
  box-shadow: 0 2px 6px rgba(47, 115, 255, 0.24);
}

.notice-read {
  border: 1px solid #dbe4f0;
  background: #f8fafc;
  color: #8a98aa;
}

.background-task-item.read > strong,
.background-task-item.read > small {
  color: #6f7f94;
}

.background-task-item > span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 900;
}

.background-task-item.attention > span {
  color: #b54708;
}

.background-task-item.notification-employee > span,
.background-task-item.notification-membership > span {
  color: #b54708;
}

.background-task-item.notification-announcement > span {
  color: #6d28d9;
}

.background-task-item.notification-info > span {
  color: #087f78;
}

.background-task-item.notification-error > span {
  color: #c1243b;
}

.background-task-item > strong {
  color: #172033;
  font-size: 12px;
}

.background-task-item > small {
  color: #708098;
  font-size: 10px;
  line-height: 1.5;
}

.background-task-empty {
  display: grid;
  gap: 5px;
  padding: 24px 12px;
  text-align: center;
}

.background-task-empty strong {
  color: #334155;
  font-size: 13px;
}

.background-task-empty span {
  color: #7b8ba1;
  font-size: 11px;
}

@media (max-width: 700px) {
  .background-task-button b {
    display: none;
  }

  .background-task-button {
    padding: 0 7px;
  }

  .background-task-panel {
    top: 58px;
    right: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 76px);
  }

  .background-task-list {
    max-height: calc(100vh - 138px);
  }
}

.consult-button,
.login-button,
.create-button,
.secondary-button,
.danger-button {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.login-button,
.create-button {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.danger-button {
  border-color: #ffd7df;
  background: #fff5f7;
  color: #c83252;
}

.page-card {
  margin: 24px;
}

#chatPage.page-card,
#groupChatPage.page-card {
  margin: 12px 24px 24px 12px;
}

.app-layout.chat-view-mode #chatPage.page-card {
  margin: 8px 16px 10px 8px;
}

.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

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

.page-title p {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.page-title h1 {
  margin: 0;
  font-size: 24px;
}

.admin-compact-title {
  align-items: center;
  min-height: 44px;
  margin-bottom: 14px;
}

.admin-compact-title h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  line-height: 1.2;
}

.admin-compact-title h1::before {
  content: "";
  width: 4px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2f73ff, #22d3ee);
}

.admin-compact-title .title-actions {
  align-items: center;
}

.company-fund-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, auto);
  gap: 12px;
  align-items: center;
  min-width: 238px;
  overflow: hidden;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  padding: 12px 16px;
  background:
    radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.28), transparent 32%),
    linear-gradient(135deg, #f8fbff 0%, #edf5ff 48%, #e8f7ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 14px 32px rgba(47, 115, 255, 0.14);
}

.company-fund-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -28px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(47, 115, 255, 0.1);
}

.fund-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f73ff, #22c1ff);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(47, 115, 255, 0.24);
}

.company-fund-card div {
  position: relative;
  z-index: 1;
}

.company-fund-card em {
  display: block;
  color: #6b7a90;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.company-fund-card strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.tabs {
  display: flex;
  gap: 26px;
  min-height: 42px;
  margin: 0 -24px 0;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tabs button {
  position: relative;
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: #4b5563;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.tabs button.active {
  color: var(--blue);
  font-weight: 750;
}

.tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: var(--blue);
}

.filter-panel {
  display: grid;
  grid-template-columns: 180px minmax(220px, 1fr) 90px;
  gap: 12px;
  margin: 18px 0;
}

.filter-panel select,
.filter-panel input,
.filter-panel button {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.filter-panel select,
.filter-panel input {
  padding: 0 12px;
  color: #374151;
}

.filter-panel button {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 750;
}

.plaza-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
}

.agent-card {
  position: relative;
  min-height: 306px;
  overflow: hidden;
  padding: 22px 20px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.agent-card:hover {
  transform: translateY(-3px);
  border-color: #b9d1ff;
  box-shadow: 0 16px 36px rgba(47, 115, 255, 0.13);
}

.agent-card[data-detail-agent] {
  cursor: pointer;
}

.agent-face {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  place-items: center;
  border: 6px solid #f2f4f8;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.role-avatar-wrap {
  position: relative;
  overflow: visible;
  border-color: #eef4ff;
  background: #fff;
  color: inherit;
  image-rendering: pixelated;
}

.agent-crown-badge {
  position: absolute;
  left: -8px;
  top: -14px;
  z-index: 4;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  transform: rotate(-35deg);
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd166, #f59e0b);
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.28);
}

.role-avatar-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 10px 12px rgba(35, 52, 84, 0.16));
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}

.role-avatar-img {
  display: block;
  width: 112%;
  height: 112%;
  margin: -6%;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  image-rendering: pixelated;
}

.army-avatar-button.role-avatar-wrap,
.employee-avatar.role-avatar-wrap {
  border: 5px solid #eef4ff;
  border-radius: 50%;
  padding: 0;
  background: #fff;
}

.employee-avatar.role-avatar-wrap {
  flex: 0 0 64px;
}

.pixel-role-avatar {
  position: relative;
  overflow: visible;
  border-color: #edf3ff;
  background:
    radial-gradient(circle at 50% 36%, #ffffff 0 22%, #dce8ff 23% 43%, var(--suit) 44% 68%, #172033 69%);
  image-rendering: pixelated;
}

.pixel-role-avatar i {
  position: absolute;
  display: block;
  image-rendering: pixelated;
}

.pixel-role-avatar .role-head {
  left: 50%;
  top: 15%;
  width: 30px;
  height: 30px;
  transform: translateX(-50%);
  background: var(--skin);
  box-shadow:
    -5px 6px 0 var(--skin),
    5px 6px 0 var(--skin),
    0 0 0 4px #172033;
}

.pixel-role-avatar .role-hair {
  left: 50%;
  top: 8%;
  width: 30px;
  height: 13px;
  transform: translateX(-50%);
  background: var(--hair);
  box-shadow:
    -8px 9px 0 -1px var(--hair),
    8px 9px 0 -1px var(--hair);
}

.pixel-role-avatar .role-eyes {
  left: 50%;
  top: 34%;
  width: 20px;
  height: 9px;
  transform: translateX(-50%);
  background:
    linear-gradient(90deg, #fff 0 36%, transparent 36% 64%, #fff 64%),
    linear-gradient(90deg, #172033 0 18%, transparent 18% 68%, #172033 68%);
  box-shadow:
    -5px 8px 0 -3px #f48ca0,
    5px 8px 0 -3px #f48ca0,
    0 12px 0 -4px #7f1d1d;
}

.pixel-role-avatar .role-body {
  left: 50%;
  bottom: 9%;
  width: 26px;
  height: 22px;
  transform: translateX(-50%);
  background: var(--suit);
  box-shadow:
    inset 0 -7px 0 var(--suit-dark),
    inset 11px 0 0 var(--accent),
    0 0 0 4px #172033;
}

.pixel-role-avatar .role-prop {
  right: 10%;
  bottom: 18%;
  width: 12px;
  height: 18px;
  background: var(--accent);
  box-shadow: 0 0 0 3px #172033;
}

.pixel-role-avatar.avatar-strategist .role-hat {
  left: 50%;
  top: -8%;
  width: 34px;
  height: 7px;
  transform: translateX(-50%);
  background: #111827;
  box-shadow:
    7px -14px 0 -3px #111827,
    7px -8px 0 -3px #ffd166;
}

.pixel-role-avatar.avatar-strategist .role-prop {
  right: 7%;
  bottom: 8%;
  width: 4px;
  height: 32px;
  background: #8a5d22;
  box-shadow:
    0 0 0 2px #172033,
    -2px -4px 0 2px #ffd166;
}

.pixel-role-avatar.avatar-support .role-prop {
  right: 5%;
  bottom: 34%;
  width: 16px;
  height: 10px;
  background: #fff;
  box-shadow:
    0 0 0 3px #172033,
    -28px -17px 0 -5px #2b3a55,
    11px -17px 0 -5px #2b3a55;
}

.pixel-role-avatar.avatar-support .role-hair {
  background: #334155;
  box-shadow:
    -8px 9px 0 -1px #334155,
    8px 9px 0 -1px #334155;
}

.pixel-role-avatar.avatar-product .role-prop {
  right: 6%;
  bottom: 20%;
  width: 15px;
  height: 20px;
  background: #dbeafe;
  box-shadow:
    0 0 0 3px #172033,
    inset 0 5px 0 #5266d8,
    inset 0 11px 0 #22c55e;
}

.pixel-role-avatar.avatar-product .role-hair {
  background: #1e293b;
  box-shadow:
    -8px 9px 0 -1px #1e293b,
    8px 9px 0 -1px #1e293b;
}

.agent-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.agent-card-quality {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 26px;
  margin: -2px 0 8px;
  border: 1px solid #dbe8ff;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f7fbff;
  color: #5f6d82;
  font-size: 11px;
  font-weight: 850;
}

.agent-card-quality em {
  overflow: hidden;
  max-width: 92px;
  color: #667085;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-card-grade {
  color: #2f73ff;
}

.agent-card-grade.grade-s {
  color: #b45309;
}

.agent-card-grade.grade-a {
  color: #2563eb;
}

.agent-card-grade.grade-c {
  color: #64748b;
}

.agent-desc {
  display: grid;
  gap: 7px;
  min-height: 76px;
  margin: 0 auto 12px;
  color: #586273;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.agent-desc span {
  display: flex;
  min-width: 0;
  align-items: center;
  white-space: nowrap;
}

.agent-desc strong {
  flex: 0 0 auto;
  color: #374151;
  font-weight: 700;
}

.agent-desc em {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #586273;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tags {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 22px;
  margin-bottom: 10px;
  color: #8b95a7;
  font-size: 12px;
}

.tags span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.tags span::before {
  content: "◎";
  color: #b2bccb;
  font-size: 12px;
}

.tags .capability-tag {
  gap: 5px;
  min-height: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0 10px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

.tags .capability-tag::before {
  display: none;
}

.tags .capability-tag svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.tags .capability-tag.image {
  color: #0798f6;
}

.tags .capability-tag.video {
  color: #ff4757;
}

.tags .capability-tag.music {
  color: #8b5cf6;
}

.salary {
  margin-bottom: 4px;
  color: var(--red);
  font-weight: 800;
}

.salary span {
  display: inline-block;
  margin-left: 6px;
  border-radius: 4px;
  padding: 2px 6px;
  background: #fff1cf;
  color: var(--gold);
  font-size: 12px;
}

.hire-button {
  min-width: 120px;
  height: 38px;
  border: 1px solid #05070d;
  border-radius: 6px;
  background: #05070d;
  color: #fff;
  font-weight: 750;
}

.hire-button.hired {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.hired-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #13b981;
  color: #fff;
  box-shadow: 0 8px 18px rgba(19, 185, 129, 0.24);
  font-size: 15px;
  font-weight: 900;
}

.agent-mobile-hired-status {
  display: none;
}

.agent-card-chat-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 5px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 9px 22px rgba(47, 115, 255, 0.24);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.agent-card-chat-button:hover,
.agent-card-chat-button:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 26px rgba(47, 115, 255, 0.32);
}

.agent-card-chat-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.agent-hover-actions {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 54px 18px 18px;
  background: linear-gradient(180deg, rgba(47, 115, 255, 0), rgba(47, 115, 255, 0.72) 48%, #2f73ff 100%);
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.agent-card:hover .agent-hover-actions,
.agent-card:focus-within .agent-hover-actions {
  opacity: 1;
  transform: translateY(0);
}

.trial-button {
  height: 38px;
  border: 1px solid #fff;
  border-radius: 6px;
  background: #fff;
  color: #27364b;
  font-weight: 800;
}

.trial-button:disabled {
  cursor: default;
  color: #9fb0cf;
  opacity: 0.82;
}

body.modal-open {
  overflow: hidden;
}

.agent-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(10px);
}

.agent-detail-overlay.hidden {
  display: none;
}

.agent-detail-modal {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(62vw, 960px);
  max-height: 70vh;
  overflow: hidden;
  border: 1px solid #cfe0fb;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.28);
  transform-origin: 50% 42%;
  animation: agentDetailSpringIn 0.44s cubic-bezier(0.18, 0.9, 0.28, 1.18) both;
}

@keyframes agentDetailSpringIn {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.9);
  }

  62% {
    opacity: 1;
    transform: translateY(-4px) scale(1.018);
  }

  82% {
    transform: translateY(1px) scale(0.994);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.agent-detail-close {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #dce8ff;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  color: #667085;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1);
}

.agent-detail-close:hover {
  border-color: #bdd3ff;
  color: #2f73ff;
}

.agent-detail-hero {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) minmax(214px, 250px);
  gap: 13px;
  align-items: start;
  padding: 16px 22px 14px;
  border-bottom: 1px solid #dfeaff;
  background:
    radial-gradient(circle at 18% 12%, rgba(36, 198, 220, 0.16), transparent 33%),
    linear-gradient(135deg, rgba(47, 115, 255, 0.13), rgba(255, 255, 255, 0));
}

.agent-detail-avatar {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 5px solid #eef4ff;
  border-radius: 20px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e4edfb, 0 18px 38px rgba(47, 115, 255, 0.13);
}

.agent-detail-avatar .role-avatar-img {
  width: 62px;
  height: 62px;
  margin: 0;
  object-fit: contain;
  border-radius: 0;
}

.agent-detail-avatar .role-avatar-svg {
  width: 62px;
  height: 62px;
}

.agent-detail-hero h2 {
  margin: 0 0 5px;
  color: #121a2c;
  font-size: 19px;
  line-height: 1.25;
}

.agent-detail-hero p {
  max-width: 100%;
  margin: 0;
  color: #5f6d82;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.agent-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.agent-detail-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #eef5ff;
  padding: 0 9px;
  color: #356fe6;
  font-size: 12px;
  font-weight: 700;
}

.agent-detail-compensation {
  justify-self: end;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.agent-detail-grade-badge {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 58px;
  border: 1px solid rgba(47, 115, 255, 0.28);
  border-radius: 16px;
  padding: 10px 8px;
  background: linear-gradient(180deg, #ffffff, #eef5ff);
  box-shadow: 0 16px 32px rgba(47, 115, 255, 0.12);
  text-align: center;
}

.agent-detail-grade-badge span {
  color: #2f73ff;
  font-size: 19px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.agent-detail-grade-badge strong {
  margin-top: 6px;
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(47, 115, 255, 0.1);
  color: #31527e;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

.agent-detail-grade-badge.grade-s {
  border-color: rgba(212, 151, 36, 0.42);
  background: linear-gradient(180deg, #fffdf5, #fff0c2);
}

.agent-detail-grade-badge.grade-s span {
  color: #c27b00;
}

.agent-detail-grade-badge.grade-s strong {
  background: rgba(194, 123, 0, 0.13);
  color: #906000;
}

.agent-detail-grade-badge.grade-a {
  border-color: rgba(90, 77, 235, 0.36);
  background: linear-gradient(180deg, #ffffff, #f1efff);
}

.agent-detail-grade-badge.grade-a span {
  color: #5a4deb;
}

.agent-detail-grade-badge.grade-a strong {
  background: rgba(90, 77, 235, 0.11);
  color: #4a3dbd;
}

.agent-detail-grade-badge.grade-c {
  border-color: rgba(100, 116, 139, 0.28);
  background: linear-gradient(180deg, #ffffff, #f4f7fb);
}

.agent-detail-grade-badge.grade-c span {
  color: #64748b;
}

.agent-detail-pay-badge {
  align-self: start;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  min-width: 126px;
  border: 1px solid #dce8ff;
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 32px rgba(47, 115, 255, 0.1);
  text-align: center;
}

.agent-detail-pay-badge span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.agent-detail-pay-badge strong {
  color: var(--red);
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
}

.agent-detail-pay-badge em {
  color: #667085;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.agent-detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
  padding: 14px 22px 16px;
}

.agent-detail-workflow h3 {
  margin: 0 0 8px;
  color: #2f73ff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

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

.agent-detail-workflow > h3 {
  grid-column: 1 / -1;
}

.agent-detail-workflow-head {
  grid-column: 1 / -1;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-detail-workflow-head h3 {
  margin: 0;
}

.agent-detail-production-capabilities {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.agent-detail-production-capabilities > span {
  display: inline-flex;
  min-width: 0;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  border: 1px solid #d8e6ff;
  border-radius: 9px;
  padding: 0 9px;
  background: #f7faff;
  color: #356fe6;
}

.agent-detail-production-capabilities > span.video {
  color: #6555d9;
}

.agent-detail-production-capabilities > span.music {
  border-color: #e2d8ff;
  background: #faf8ff;
  color: #8b5cf6;
}

.agent-detail-production-capabilities svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.agent-detail-production-capabilities em {
  overflow: hidden;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-detail-step {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 48px;
  margin-bottom: 0;
  border: 1px solid #dce8ff;
  border-radius: 12px;
  background: #f8fbff;
  padding: 6px 10px 6px 26px;
}

.agent-detail-step span {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2f73ff, #24c6dc);
  transform: translateY(-50%);
}

.agent-detail-step strong {
  color: #1d2939;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.agent-detail-step em {
  min-width: 0;
  color: #586273;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: normal;
}

.agent-detail-capabilities {
  display: grid;
  gap: 8px;
  align-self: start;
  margin-top: 0;
}

.agent-detail-price-card {
  grid-column: 1 / -1;
}

.agent-detail-capabilities h3 {
  margin: 0;
  color: #2f73ff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

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

.agent-capability-grid article {
  display: grid;
  gap: 4px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  min-height: 68px;
  padding: 8px 10px;
  background: #f8fbff;
}

.agent-capability-grid span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.agent-capability-grid strong {
  color: #1f3048;
  font-size: 11px;
  line-height: 1.48;
  font-weight: 850;
}

.agent-detail-price-card {
  align-self: start;
  border: 1px solid #dce8ff;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
  text-align: left;
  box-shadow: 0 18px 36px rgba(47, 115, 255, 0.12);
}

.agent-detail-model {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 12px;
}

.agent-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.agent-detail-employment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
  text-align: left;
}

.agent-detail-employment div {
  display: grid;
  align-content: center;
  gap: 4px;
  border-radius: 10px;
  min-height: 44px;
  padding: 7px 8px;
  background: #f8fbff;
}

.agent-detail-employment span {
  color: #7b8798;
  font-size: 11px;
  line-height: 1.35;
}

.agent-detail-employment strong {
  color: #172033;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}

.agent-detail-actions .trial-button,
.agent-detail-actions .hire-button {
  width: 100%;
  height: 34px;
  border-radius: 10px;
  font-size: 13px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.agent-detail-actions .hire-button {
  border: 0;
  background: linear-gradient(135deg, #7b3cff, #20bdf2);
  box-shadow: 0 16px 30px rgba(47, 115, 255, 0.24);
}

.agent-detail-actions .trial-button:not(:disabled):hover,
.agent-detail-actions .hire-button:not(:disabled):hover {
  transform: translateY(-2px);
}

.agent-detail-actions .trial-button:not(:disabled):hover {
  border-color: #b9d1ff;
  background: #f7fbff;
  box-shadow: 0 12px 24px rgba(47, 115, 255, 0.12);
  color: #2f73ff;
}

.agent-detail-actions .hire-button:not(:disabled):hover {
  box-shadow:
    0 18px 34px rgba(47, 115, 255, 0.28),
    0 0 0 5px rgba(47, 115, 255, 0.08);
  filter: saturate(1.08);
}

.agent-detail-actions .trial-button:not(:disabled):active,
.agent-detail-actions .hire-button:not(:disabled):active {
  transform: translateY(0) scale(0.98);
}

.empty {
  grid-column: 1 / -1;
  padding: 50px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.metric-grid,
.group-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.workgroup-composer {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(47, 115, 255, 0.08), rgba(38, 195, 255, 0.06)),
    #fff;
  box-shadow: var(--shadow);
}

.workgroup-composer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.workgroup-composer-head h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.workgroup-composer-head p {
  max-width: 720px;
}

.workgroup-composer-head > span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.workgroup-composer label {
  color: #111827;
  font-size: 16px;
  font-weight: 850;
}

.workgroup-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  align-items: stretch;
}

.workgroup-input-row textarea {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.86);
  resize: vertical;
  line-height: 1.7;
}

.workgroup-input-row button {
  align-self: end;
  min-height: 44px;
}

.workgroup-composer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.team-template-section {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.team-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.team-template-market-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe7f8;
  border-radius: 8px;
  background: #fff;
}

.team-template-market-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}

.team-template-market-tabs button {
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  color: #51627a;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.team-template-market-tabs button.active {
  border-color: #2f73ff;
  background: #0f172a;
  color: #2f73ff;
  color: #fff;
}

.team-template-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.team-template-filters label {
  display: grid;
  gap: 4px;
}

.team-template-filters span {
  color: #6b7890;
  font-size: 11px;
  font-weight: 850;
}

.team-template-filters select {
  width: 100%;
  border: 1px solid #d8e4f4;
  border-radius: 7px;
  padding: 8px 9px;
  background: #f8fbff;
  color: #172033;
  font-size: 12px;
  font-weight: 750;
}

.team-template-card {
  display: grid;
  gap: 8px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(37, 71, 123, 0.07);
}

.team-template-cover,
.dashboard-template-cover {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 8px;
  background: #eef5ff;
  aspect-ratio: 16 / 7;
}

.team-template-cover img,
.dashboard-template-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-template-cover::after,
.dashboard-template-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.42));
}

.team-template-cover figcaption,
.dashboard-template-cover figcaption {
  position: absolute;
  right: 10px;
  top: 9px;
  z-index: 1;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #1f3f70;
  font-size: 10px;
  font-weight: 900;
}

.team-template-card.recommended {
  border-color: #9fc4ff;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.team-template-title-row,
.team-template-head,
.team-template-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-template-title-row {
  min-width: 0;
}

.team-template-title-row h3 {
  min-width: 0;
}

.team-template-head span,
.team-template-head em,
.team-template-title-row em {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.team-template-head span {
  background: #eaf2ff;
  color: #2f73ff;
}

.team-template-head em {
  margin-left: auto;
  background: #e8fff4;
  color: #0ca66b;
}

.team-template-title-row em {
  flex: 0 0 auto;
  background: #e8fff4;
  color: #0ca66b;
}

.team-template-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
}

.team-template-card p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.team-template-tags,
.team-template-roles,
.team-template-market-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.team-template-tags b,
.team-template-roles span {
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
}

.team-template-tags b {
  background: #f2f7ff;
  color: #47617f;
}

.team-template-roles span {
  background: #f6f9ff;
  color: #53657c;
}

.team-template-role-avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  padding: 1px;
  border: 1px solid transparent;
}

.team-template-role-avatar.hired {
  border-color: rgba(16, 185, 129, 0.46);
  background: rgba(220, 252, 231, 0.94);
}

.team-template-role-avatar.unhired {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(254, 226, 226, 0.92);
}

.team-template-role-face.role-avatar-wrap {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.team-template-role-face .role-avatar-img,
.team-template-role-face .role-avatar-svg {
  width: 94%;
  height: 94%;
  margin: 0;
  object-fit: contain;
  object-position: center center;
  transform: scale(1.78);
  transform-origin: center center;
}

.team-template-market-meta span {
  border: 1px solid #d8e4f4;
  border-radius: 7px;
  padding: 5px 8px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.team-template-proof {
  display: grid;
  gap: 3px;
  min-height: 54px;
  padding: 10px 12px;
  border-left: 3px solid #2f73ff;
  background: #f6f9ff;
}

.team-template-proof strong {
  color: #2f73ff;
  font-size: 12px;
}

.team-template-proof span {
  overflow: hidden;
  color: #4d5d75;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-template-footer small {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.team-template-footer .create-button {
  min-width: 90px;
  padding: 8px 12px;
}

.enterprise-template-card.paused {
  border-style: dashed;
  background: #f8fafc;
}

.enterprise-template-card.paused .team-template-head em {
  background: #eef1f5;
  color: #64748b;
}

.enterprise-template-meta {
  display: flex;
  gap: 6px;
}

.enterprise-template-meta span {
  border: 1px solid #d9e4f3;
  border-radius: 6px;
  padding: 4px 7px;
  background: #f8fbff;
  color: #65758c;
  font-size: 10px;
  font-weight: 850;
}

.enterprise-template-card .team-template-footer {
  align-items: stretch;
  flex-direction: column;
}

.enterprise-template-actions {
  display: grid;
  grid-template-columns: repeat(3, auto) minmax(90px, 1fr);
  gap: 6px;
}

.enterprise-template-actions button {
  min-width: 0;
  padding: 7px 9px;
  font-size: 11px;
}

.enterprise-template-actions .danger {
  border-color: #fecdd3;
  color: #be123c;
  background: #fff7f8;
}

.team-template-inline-edit {
  width: fit-content;
  margin-top: 10px;
}

.enterprise-template-paused-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 12px;
}

.enterprise-template-paused-notice strong,
.enterprise-template-paused-notice span {
  display: block;
}

.enterprise-template-paused-notice strong {
  color: #172033;
}

.enterprise-template-paused-notice span {
  color: #6b7b92;
  font-size: 12px;
}

.enterprise-template-paused-notice button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.enterprise-template-editor {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.enterprise-template-editor-scroll {
  display: grid;
  gap: 22px;
  overflow: auto;
  padding: 24px 32px 30px;
}

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

.enterprise-template-editor-grid label {
  display: grid;
  gap: 6px;
}

.enterprise-template-editor-grid label.wide {
  grid-column: 1 / -1;
}

.enterprise-template-editor-grid span,
.enterprise-template-editor-section header span {
  color: #66758c;
  font-size: 11px;
  font-weight: 850;
}

.enterprise-template-editor input,
.enterprise-template-editor textarea {
  width: 100%;
  border: 1px solid #cedcf0;
  border-radius: 7px;
  padding: 9px 10px;
  background: #fbfdff;
  color: #172033;
  font: inherit;
  font-size: 12px;
  outline: none;
}

.enterprise-template-editor input:focus,
.enterprise-template-editor textarea:focus {
  border-color: #79a9ff;
  box-shadow: 0 0 0 3px rgba(47, 115, 255, 0.1);
}

.enterprise-template-editor-section {
  display: grid;
  gap: 10px;
}

.enterprise-template-editor-section > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.enterprise-template-editor-section > header strong {
  color: #172033;
  font-size: 15px;
}

.enterprise-template-editor-list {
  display: grid;
  gap: 7px;
}

.enterprise-template-editor-list article {
  display: grid;
  align-items: center;
  gap: 8px;
  border: 1px solid #dce6f4;
  border-radius: 7px;
  padding: 9px;
  background: #fff;
}

.enterprise-template-editor-list.roles article {
  grid-template-columns: 70px minmax(140px, 0.7fr) minmax(260px, 1.5fr);
}

.enterprise-template-editor-list.steps article {
  grid-template-columns: 34px minmax(150px, 0.8fr) minmax(120px, 0.55fr) minmax(220px, 1.2fr);
}

.enterprise-template-editor-list b {
  color: #2f73ff;
  font-size: 11px;
  text-align: center;
}

.enterprise-template-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #d8e3f2;
  padding: 14px 32px;
  background: #fff;
}

.enterprise-template-editor-actions span {
  margin-right: auto;
  color: #718099;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 720px) {
  .enterprise-template-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .enterprise-template-editor-scroll {
    gap: 16px;
    padding: 18px 16px 24px;
  }

  .enterprise-template-editor-grid {
    grid-template-columns: 1fr;
  }

  .enterprise-template-editor-grid label.wide {
    grid-column: auto;
  }

  .enterprise-template-editor-section > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .enterprise-template-editor-list.roles article,
  .enterprise-template-editor-list.steps article {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .enterprise-template-editor-list.roles article input:last-child,
  .enterprise-template-editor-list.steps article input:nth-of-type(2),
  .enterprise-template-editor-list.steps article input:nth-of-type(3) {
    grid-column: 2;
  }

  .enterprise-template-editor-actions {
    align-items: stretch;
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .enterprise-template-editor-actions span {
    flex-basis: 100%;
    margin-right: 0;
  }
}

.team-template-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 360;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.44);
  backdrop-filter: blur(10px);
}

.team-template-detail-overlay.hidden {
  display: none;
}

.team-template-detail-modal {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1120px, 96vw);
  max-height: min(900px, 94vh);
  overflow: hidden;
  border: 1px solid #cbdcf8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 36px 96px rgba(15, 23, 42, 0.28);
  animation: agentDetailSpringIn 0.36s cubic-bezier(0.18, 0.9, 0.28, 1.12) both;
}

.team-template-detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 1px solid #d9e5f8;
  border-radius: 8px;
  background: #fff;
  color: #5f6f87;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

.team-template-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  padding: 28px 72px 24px 32px;
  border-bottom: 1px solid #dbe6f7;
  background:
    linear-gradient(90deg, rgba(47, 115, 255, 0.08), rgba(32, 196, 214, 0.035)),
    #fff;
}

.team-template-detail-head > div:first-child > span {
  color: #2f73ff;
  font-size: 12px;
  font-weight: 900;
}

.team-template-detail-head h2 {
  margin: 6px 0;
  color: #172033;
  font-size: 30px;
  line-height: 1.25;
}

.team-template-detail-head p {
  max-width: 680px;
  margin: 0;
  color: #63718a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.team-template-detail-stats {
  display: flex;
  align-items: center;
  gap: 22px;
}

.team-template-detail-stats strong {
  display: grid;
  gap: 3px;
  min-width: 62px;
  color: #172033;
  font-size: 22px;
}

.team-template-detail-stats small {
  color: #7b8aa1;
  font-size: 11px;
  font-weight: 750;
}

.team-template-detail-body {
  overflow: auto;
  padding: 0 32px 32px;
  background: #f7f9fc;
}

.team-template-detail-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 32px;
  margin: 0 -32px;
  padding: 28px 32px;
  border-bottom: 1px solid #dde6f3;
  background: #fff;
}

.team-template-detail-intro h3,
.team-template-detail-title h3 {
  margin: 0 0 7px;
  color: #172033;
  font-size: 19px;
}

.team-template-detail-intro p,
.team-template-detail-title p {
  margin: 0;
  color: #6b7890;
  font-size: 13px;
  line-height: 1.7;
}

.team-template-audience {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.team-template-audience span {
  padding: 6px 10px;
  border: 1px solid #cfe0fb;
  border-radius: 6px;
  background: #f8fbff;
  color: #3f5f8d;
  font-size: 12px;
  font-weight: 800;
}

.team-template-guide {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-template-guide li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.team-template-guide b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #2f73ff;
  color: #fff;
  font-size: 12px;
}

.team-template-guide span {
  color: #40516c;
  font-size: 13px;
  font-weight: 800;
}

.team-template-delivery-strip {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) repeat(var(--delivery-count, 4), minmax(0, 1fr));
  gap: 1px;
  margin: 0 -32px;
  border-bottom: 1px solid #dde6f3;
  background: #dde6f3;
}

.team-template-delivery-strip > div,
.team-template-delivery-strip article {
  min-width: 0;
  padding: 15px 18px;
  background: #f9fbfe;
}

.team-template-delivery-strip > div {
  display: grid;
  align-content: center;
  gap: 3px;
}

.team-template-delivery-strip > div span {
  color: #2f73ff;
  font-size: 9px;
  font-weight: 900;
}

.team-template-delivery-strip > div strong {
  color: #172033;
  font-size: 13px;
}

.team-template-delivery-strip article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.team-template-delivery-strip article b {
  color: #91a1b8;
  font-size: 11px;
}

.team-template-delivery-strip article span {
  overflow: hidden;
  color: #40516c;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-template-detail-section {
  padding-top: 28px;
}

.team-template-detail-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.team-template-detail-title > span {
  color: #2f73ff;
  font-size: 12px;
  font-weight: 850;
}

.team-template-role-note {
  display: block;
  margin-top: 6px;
  color: #8a98ad;
  font-size: 10px;
  font-weight: 800;
}

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

.team-template-case {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid #d8e3f2;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.team-template-case-number {
  color: #a3b2c8;
  font-size: 20px;
  font-weight: 900;
}

.team-template-case-copy h4 {
  margin: 0 0 7px;
  color: #172033;
  font-size: 15px;
}

.team-template-case-copy p {
  margin: 0 0 9px;
  color: #718099;
  font-size: 12px;
  line-height: 1.6;
}

.team-template-case-copy > strong {
  color: #344760;
  font-size: 12px;
  line-height: 1.6;
}

.team-template-output-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  margin-top: 2px;
  padding: 12px;
  border-top: 1px solid #e5ebf4;
  background:
    linear-gradient(rgba(47, 115, 255, 0.035) 1px, transparent 1px),
    #fbfdff;
  background-size: 100% 28px, auto;
}

.team-template-output-preview > span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 900;
}

.team-template-output-preview div {
  position: relative;
  padding-left: 14px;
  color: #4c5f79;
  font-size: 12px;
  font-weight: 750;
}

.team-template-output-preview div::before {
  position: absolute;
  top: 7px;
  left: 0;
  width: 6px;
  height: 2px;
  background: #20b9c7;
  content: "";
}

.team-template-step-list {
  display: grid;
  border-top: 1px solid #dbe4f1;
  background: #fff;
}

.team-template-step-list article {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border: 1px solid #dbe4f1;
  border-top: 0;
  padding: 10px 14px;
}

.team-template-step-list article > b {
  color: #2f73ff;
  font-size: 13px;
}

.team-template-step-list article > div {
  display: grid;
  gap: 4px;
}

.team-template-step-list strong {
  color: #263750;
  font-size: 13px;
}

.team-template-step-list span {
  color: #7b889d;
  font-size: 11px;
}

.team-template-step-list em {
  color: #536984;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.team-template-role-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.team-template-role-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  min-height: 118px;
  border-top: 3px solid #2f73ff;
  padding: 13px;
  background: #fff;
}

.team-template-role-list strong {
  display: block;
  color: #263750;
  font-size: 13px;
}

.team-template-role-list span {
  display: block;
  margin: 4px 0 8px;
  color: #20a8b6;
  font-size: 10px;
  font-weight: 900;
}

.team-template-role-list p {
  margin: 0;
  color: #718099;
  font-size: 11px;
  line-height: 1.6;
}

.team-template-detail-role-avatar.role-avatar-wrap {
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(47, 115, 255, 0.22);
  border-radius: 16px;
  padding: 3px;
  background: #eef6ff;
  box-shadow: none;
}

.team-template-detail-role-avatar .role-avatar-img,
.team-template-detail-role-avatar .role-avatar-svg {
  width: 88%;
  height: 88%;
  margin: 0;
  object-fit: contain;
  object-position: center center;
  transform: translateY(0);
}

.account-avatar-crop-overlay {
  position: fixed;
  inset: 0;
  z-index: 360;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(10px);
}

.account-avatar-crop-overlay.hidden {
  display: none;
}

.account-avatar-crop-modal {
  position: relative;
  display: grid;
  width: min(720px, 94vw);
  max-height: min(760px, 92vh);
  overflow: hidden;
  border: 1px solid #cbdcf8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.3);
}

.account-avatar-crop-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 1px solid #d9e5f8;
  border-radius: 8px;
  background: #fff;
  color: #5f6f87;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}

.account-avatar-crop-head {
  padding: 22px 58px 16px 24px;
  border-bottom: 1px solid #dce7f8;
  background: #f7faff;
}

.account-avatar-crop-head span {
  color: #2f73ff;
  font-size: 11px;
  font-weight: 900;
}

.account-avatar-crop-head h2 {
  margin: 5px 0;
  color: #172033;
  font-size: 22px;
}

.account-avatar-crop-head p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.account-avatar-crop-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
  padding: 22px 24px;
}

.account-avatar-crop-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  background:
    linear-gradient(45deg, #f3f7ff 25%, transparent 25% 75%, #f3f7ff 75%),
    linear-gradient(45deg, #f3f7ff 25%, transparent 25% 75%, #f3f7ff 75%);
  background-position: 0 0, 10px 10px;
  background-size: 20px 20px;
  cursor: grab;
  touch-action: none;
}

.account-avatar-crop-stage:active {
  cursor: grabbing;
}

.account-avatar-crop-stage img,
.account-avatar-crop-preview img {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  transform-origin: center center;
  user-select: none;
  pointer-events: none;
}

.account-avatar-crop-stage span {
  position: relative;
  z-index: 2;
  width: 220px;
  height: 220px;
  border: 2px solid #fff;
  border-radius: 18px;
  box-shadow:
    0 0 0 999px rgba(15, 23, 42, 0.36),
    0 0 0 1px rgba(47, 115, 255, 0.45);
  pointer-events: none;
}

.account-avatar-crop-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.account-avatar-crop-preview {
  position: relative;
  width: 108px;
  height: 108px;
  justify-self: center;
  overflow: hidden;
  border: 1px solid #d8e6ff;
  border-radius: 22px;
  background: #f7faff;
}

.account-avatar-crop-zoom {
  display: grid;
  gap: 8px;
  color: #536984;
  font-size: 12px;
  font-weight: 850;
}

.account-avatar-crop-move {
  display: grid;
  grid-template-columns: repeat(3, 42px);
  gap: 7px;
  justify-content: center;
}

.account-avatar-crop-move button {
  height: 34px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #fff;
  color: #2f73ff;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.account-avatar-crop-move button:first-child,
.account-avatar-crop-move button:last-child {
  grid-column: 2;
}

.account-avatar-crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid #dce7f8;
}

.team-template-detail-actions {
  padding: 16px 32px;
  border-top: 1px solid #d8e3f2;
  background: #fff;
}

.team-template-clone-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(320px, 1.45fr) minmax(380px, auto);
  align-items: end;
  gap: 12px;
}

.team-template-clone-form label {
  display: grid;
  gap: 5px;
}

.team-template-clone-form label > span {
  color: #52627a;
  font-size: 11px;
  font-weight: 850;
}

.team-template-clone-form input,
.team-template-clone-form textarea {
  width: 100%;
  height: 42px;
  min-height: 42px;
  border: 1px solid #d5e2f5;
  border-radius: 7px;
  padding: 8px 10px;
  background: #f9fbff;
  color: #172033;
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  outline: none;
}

.team-template-clone-form textarea {
  max-height: 42px;
  overflow: hidden;
  resize: none;
}

.team-template-clone-form input:focus,
.team-template-clone-form textarea:focus {
  border-color: #8eb8ff;
  box-shadow: 0 0 0 3px rgba(47, 115, 255, 0.1);
}

.team-template-clone-actions {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 8px;
}

.team-template-clone-actions small {
  grid-column: 1 / -1;
  max-width: none;
  color: #7a889d;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.team-template-clone-actions button {
  min-width: 92px;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .team-template-detail-overlay {
    align-items: end;
    padding: 0;
  }

  .team-template-detail-modal {
    width: 100%;
    max-height: 94vh;
    border-radius: 12px 12px 0 0;
  }

  .team-template-detail-head,
  .team-template-detail-intro {
    grid-template-columns: 1fr;
  }

  .team-template-detail-head {
    gap: 18px;
    padding: 24px 58px 20px 20px;
  }

  .team-template-detail-stats {
    justify-content: space-between;
  }

  .team-template-detail-body {
    padding: 0 18px 24px;
  }

  .team-template-detail-intro {
    margin: 0 -18px;
    padding: 22px 18px;
  }

  .team-template-delivery-strip {
    grid-template-columns: 1fr 1fr;
    margin: 0 -18px;
  }

  .team-template-delivery-strip > div {
    grid-column: 1 / -1;
  }

  .team-template-case-list,
  .team-template-role-list {
    grid-template-columns: 1fr;
  }

  .team-template-detail-actions {
    padding: 14px 18px;
  }

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

  .team-template-clone-actions {
    grid-template-columns: 1fr 1fr;
  }

  .team-template-clone-actions small {
    max-width: none;
  }
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 8px 0 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 20px;
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-grid article,
.group-card,
.info-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.front-dashboard-screen {
  display: grid;
  gap: 16px;
}

.dashboard-command-center {
  display: grid;
  grid-template-columns: minmax(420px, 0.82fr) minmax(520px, 1.18fr);
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  overflow: hidden;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  padding: 38px 46px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(47, 115, 255, 0.11);
}

.dashboard-workbench-hero {
  min-height: 320px;
  background:
    linear-gradient(90deg, rgba(232, 243, 255, 0.92), rgba(247, 251, 255, 0.72)),
    #f1f8ff;
}

.dashboard-command-copy {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.dashboard-command-copy span,
.dashboard-panel-title span,
.dashboard-metric-grid span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.dashboard-command-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 46px;
  font-weight: 800;
  line-height: 1.12;
}

.dashboard-command-copy p {
  margin: 0;
  max-width: 520px;
  color: #64748b;
  font-size: 15px;
  line-height: 1.7;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.dashboard-hero-actions button {
  min-width: 138px;
  min-height: 46px;
}

.dashboard-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.dashboard-hero-stats span {
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.76);
  color: #51627a;
  font-size: 12px;
  font-weight: 850;
}

.dashboard-hero-visual {
  position: relative;
  justify-self: end;
  width: min(720px, 100%);
  min-height: 260px;
  isolation: isolate;
}

.dashboard-hero-card {
  position: absolute;
  top: 50%;
  left: 50%;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(37, 71, 123, 0.18);
  transition:
    transform 0.46s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease,
    filter 0.28s ease;
}

.dashboard-hero-card-current {
  z-index: 3;
  width: 76%;
  height: 74%;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.dashboard-hero-card-prev,
.dashboard-hero-card-next {
  z-index: 1;
  width: 54%;
  height: 58%;
  opacity: 0.72;
  filter: saturate(0.92) brightness(1.04);
  cursor: pointer;
}

.dashboard-hero-card-prev {
  transform: translate(-90%, -50%) scale(0.96);
}

.dashboard-hero-card-next {
  transform: translate(-10%, -50%) scale(0.96);
}

.dashboard-hero-card-hidden {
  z-index: 0;
  width: 52%;
  height: 56%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.82);
}

.dashboard-hero-card-prev:hover,
.dashboard-hero-card-next:hover,
.dashboard-hero-card-prev:focus-visible,
.dashboard-hero-card-next:focus-visible {
  opacity: 0.9;
  filter: saturate(1) brightness(1.02);
}

.dashboard-hero-visual a {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.dashboard-hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-hero-visual figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  display: grid;
  gap: 2px;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.76);
  color: #fff;
}

.dashboard-hero-visual figcaption strong,
.dashboard-hero-visual figcaption span {
  color: #fff;
  font-size: 12px;
}

.dashboard-hero-dots {
  position: absolute;
  left: 16px;
  bottom: 18px;
  z-index: 4;
  display: flex;
  gap: 6px;
}

.dashboard-hero-dots button {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.dashboard-hero-dots button.active {
  width: 18px;
  background: #2f73ff;
  box-shadow: 0 0 0 1px rgba(47, 115, 255, 0.18);
}

.dashboard-hero-caption strong,
.dashboard-hero-caption span {
  color: #fff;
  font-size: 12px;
}

.dashboard-command-actions,
.dashboard-start-grid {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.dashboard-start-grid {
  justify-content: flex-end;
  flex-wrap: wrap;
  max-width: 430px;
}

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

.dashboard-metric-grid article,
.dashboard-panel {
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(47, 115, 255, 0.08);
}

.dashboard-metric-grid article {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.dashboard-metric-grid strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

.dashboard-metric-grid em,
.dashboard-feed-list span,
.dashboard-employee-list span,
.dashboard-employee-list em,
.dashboard-announcement-list p,
.dashboard-gauge em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  line-height: 1.55;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
}

.dashboard-panel {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 16px;
}

.dashboard-main-grid > .dashboard-panel {
  height: 100%;
}

.dashboard-recent-work-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 11px;
  min-width: 0;
  border: 1px solid #d8e6ff;
  border-radius: 12px;
  padding: 15px;
  background:
    radial-gradient(circle at 92% 0%, rgba(47, 115, 255, 0.11), transparent 34%),
    linear-gradient(145deg, #ffffff, #f7faff);
  box-shadow: 0 16px 36px rgba(47, 115, 255, 0.09);
}

.dashboard-recent-work-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-recent-work-heading > div {
  display: grid;
  gap: 4px;
}

.dashboard-recent-work-heading span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.dashboard-recent-work-heading h2,
.dashboard-recent-work-heading p {
  margin: 0;
}

.dashboard-recent-work-heading h2 {
  color: var(--ink);
  font-size: 20px;
}

.dashboard-recent-work-heading p {
  max-width: 420px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

.dashboard-recent-work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-recent-work-card {
  display: grid;
  min-width: 0;
  gap: 8px;
  border: 1px solid #dbe8ff;
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.88);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.dashboard-recent-work-card:hover,
.dashboard-recent-work-card:focus-visible {
  border-color: #9fc2ff;
  box-shadow: 0 12px 25px rgba(47, 115, 255, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.dashboard-recent-work-meta,
.dashboard-recent-work-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-recent-work-meta em {
  border-radius: 999px;
  padding: 3px 7px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.dashboard-recent-work-meta time,
.dashboard-recent-work-foot {
  color: #7b8aa4;
  font-size: 10px;
}

.dashboard-recent-work-main {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dashboard-recent-work-main > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.dashboard-recent-work-main strong,
.dashboard-recent-work-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-recent-work-main strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.dashboard-recent-work-main small {
  display: -webkit-box;
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dashboard-recent-work-avatar.role-avatar-wrap,
.dashboard-recent-work-group-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.dashboard-recent-work-group-icon {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2f73ff, #43a5ff);
  color: #fff;
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
}

.dashboard-recent-work-foot b {
  color: var(--blue);
  font-size: 15px;
}

.dashboard-recent-work-modern {
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--modern-panel-strong, #101b2d);
  box-shadow: none;
}

.dashboard-recent-work-modern .dashboard-recent-work-heading h2,
.dashboard-recent-work-modern .dashboard-recent-work-main strong {
  color: var(--modern-text, #f8fbff);
}

.dashboard-recent-work-modern .dashboard-recent-work-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
}

.dashboard-recent-work-modern .dashboard-recent-work-main small,
.dashboard-recent-work-modern .dashboard-recent-work-heading p,
.dashboard-recent-work-modern .dashboard-recent-work-foot,
.dashboard-recent-work-modern .dashboard-recent-work-meta time {
  color: var(--modern-muted, #9aa9bd);
}

.dashboard-wide-panel {
  min-height: 220px;
}

.dashboard-panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-panel-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.dashboard-panel-title span {
  color: #64748b;
  letter-spacing: 0;
  text-align: right;
}

.dashboard-ops-grid,
.dashboard-assets-grid,
.dashboard-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-ops-grid,
.dashboard-assets-grid {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
}

.dashboard-project-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 12px;
  min-height: 230px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(47, 115, 255, 0.08);
}

.dashboard-project-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 5px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #7c3cff, #2f73ff, #23c6e8);
}

.dashboard-project-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  min-height: 86px;
}

.dashboard-project-head em {
  border-radius: 999px;
  padding: 7px 12px;
  background: #eef5ff;
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.dashboard-project-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 12px;
  background: #eef9ff;
}

.dashboard-project-icon span {
  width: 24px;
  height: 24px;
  border: 4px solid #2f73ff;
  transform: rotate(45deg);
}

.dashboard-project-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-project-progress-row strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}

.dashboard-project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-project-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  background: #eef5ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.dashboard-project-preview {
  position: relative;
  display: grid;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 7;
  border: 1px solid #cfe0ff;
  border-radius: 7px;
  padding: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

@media (max-width: 1580px) {
  .dashboard-hero-visual {
    min-height: 230px;
  }

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

  .dashboard-main-grid > .dashboard-panel {
    height: auto;
  }
}

@media (max-width: 1180px) {
  .dashboard-command-center {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-visual {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .dashboard-command-center {
    padding: 24px;
  }

  .dashboard-command-copy h2 {
    font-size: 34px;
  }

  .dashboard-hero-visual {
    min-height: 180px;
  }

  .dashboard-agent-picks {
    grid-template-columns: 1fr;
  }

  .dashboard-lesson-list article {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-lesson-list figure {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 120px;
  }

  .group-message-row,
  .group-message-row.user {
    max-width: 100%;
  }

  .group-message-row.agent,
  .group-message-row.system,
  .group-message-row.user {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .group-message-row.user .group-chat-avatar {
    order: -1;
  }

  .group-chat-avatar,
  .group-chat-avatar.role-avatar-wrap {
    width: 34px;
    height: 34px;
  }
}

.dashboard-project-preview.media img,
.dashboard-project-preview.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-project-preview.media > span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 5px;
  padding: 4px 7px;
  background: rgba(15, 23, 42, 0.76);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.dashboard-project-preview.video > i {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  transform: translate(-50%, -50%);
}

.dashboard-project-preview.document,
.dashboard-project-preview.empty {
  align-content: center;
  gap: 4px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(231, 240, 255, 0.94), rgba(255, 255, 255, 0.98)),
    #fff;
}

.dashboard-project-preview.document::after,
.dashboard-project-preview.empty::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 32px;
  border: 1px solid #bcd2fb;
  border-radius: 4px;
  background: repeating-linear-gradient(180deg, transparent 0 7px, #d5e4ff 7px 8px);
}

.dashboard-project-preview > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
}

.dashboard-project-preview > strong {
  overflow: hidden;
  padding-right: 44px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-project-preview > p {
  display: -webkit-box;
  overflow: hidden;
  padding-right: 38px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.dashboard-project-preview:hover {
  border-color: #86afff;
  box-shadow: 0 8px 18px rgba(47, 115, 255, 0.12);
}

.dashboard-project-top,
.dashboard-project-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-project-top span {
  border-radius: 999px;
  padding: 6px 12px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
}

.dashboard-project-top strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}

.dashboard-project-progress {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #e4edff;
}

.dashboard-project-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2f73ff;
}

.dashboard-project-card h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.35;
}

.dashboard-project-card p,
.dashboard-template-list p,
.dashboard-lesson-list p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.dashboard-project-card p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.dashboard-project-insight {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.dashboard-project-insight span {
  overflow: hidden;
  border: 1px solid rgba(207, 224, 255, 0.86);
  border-radius: 6px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.7);
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-project-members {
  display: flex;
  align-items: center;
  min-width: 0;
}

.dashboard-project-members > span {
  display: inline-flex;
  align-items: center;
  height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
}

.dashboard-project-avatar.role-avatar-wrap {
  width: 32px;
  height: 32px;
  border: 2px solid #fff;
  box-shadow: 0 6px 14px rgba(47, 115, 255, 0.12);
}

.dashboard-project-avatar.role-avatar-wrap + .dashboard-project-avatar.role-avatar-wrap {
  margin-left: -9px;
}

.dashboard-project-avatar .role-avatar-img,
.dashboard-project-avatar .role-avatar-svg {
  width: 100%;
  height: 100%;
}

.dashboard-project-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.dashboard-project-actions button.secondary-button {
  min-width: 74px;
  padding: 8px 12px;
}

.dashboard-project-summary,
.dashboard-asset-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.dashboard-project-summary article,
.dashboard-asset-actions button {
  display: grid;
  gap: 5px;
  min-height: 104px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.dashboard-project-summary span,
.dashboard-asset-actions span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.dashboard-project-summary strong,
.dashboard-asset-actions strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}

.dashboard-project-summary p,
.dashboard-asset-actions small {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
}

.dashboard-gauge {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, #f6faff, #eef6ff);
}

.dashboard-gauge span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-gauge strong {
  color: var(--ink);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.dashboard-gauge div {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #dfeaff;
}

.dashboard-gauge i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f73ff, #22c1ff);
}

.dashboard-cost-list,
.dashboard-health-list,
.dashboard-feed-list,
.dashboard-employee-list,
.dashboard-announcement-list,
.dashboard-template-list,
.dashboard-agent-picks,
.dashboard-work-list,
.dashboard-lesson-list {
  display: grid;
  gap: 8px;
}

.dashboard-template-list {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.dashboard-cost-list div,
.dashboard-health-list div,
.dashboard-feed-list article,
.dashboard-employee-list button,
.dashboard-announcement-list article,
.dashboard-template-list article,
.dashboard-agent-picks button,
.dashboard-work-list article,
.dashboard-lesson-list article {
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fbff;
}

.dashboard-cost-list div,
.dashboard-health-list div,
.dashboard-employee-list button {
  display: grid;
  align-items: center;
  gap: 10px;
}

.dashboard-cost-list div,
.dashboard-health-list div {
  grid-template-columns: minmax(70px, 0.8fr) minmax(0, 1fr);
}

.dashboard-cost-list span,
.dashboard-health-list span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-cost-list strong,
.dashboard-health-list strong,
.dashboard-feed-list strong,
.dashboard-employee-list strong,
.dashboard-announcement-list strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.dashboard-feed-list article {
  display: grid;
  gap: 4px;
}

.dashboard-template-list article {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid transparent;
  padding-bottom: 54px;
  min-width: 0;
}

.dashboard-template-list article:hover {
  border-color: #cfe0ff;
  background: #f4f8ff;
}

.dashboard-template-list article div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-template-list .dashboard-template-cover {
  aspect-ratio: 16 / 9;
  max-height: none;
  min-height: 156px;
}

.dashboard-template-list .dashboard-template-cover figcaption {
  left: auto;
  right: 10px;
  top: 9px;
  bottom: auto;
}

.dashboard-template-list p {
  display: -webkit-box;
  min-height: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dashboard-template-list span {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.dashboard-template-list button,
.dashboard-work-list button,
.dashboard-agent-picks button {
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dashboard-template-list button.dashboard-template-detail {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-agent-picks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-agent-picks button {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 116px;
  width: 100%;
  padding: 14px 74px 14px 14px;
  border: 1px solid transparent;
  background:
    linear-gradient(135deg, rgba(238, 246, 255, 0.96), rgba(248, 251, 255, 0.98)),
    #f8fbff;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.dashboard-agent-picks button:hover,
.dashboard-work-list button:hover {
  border-color: #cfe0ff;
  background: #eef6ff;
  transform: translateY(-1px);
}

.dashboard-agent-picks strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.dashboard-agent-picks span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-agent-picks small {
  display: -webkit-box;
  overflow: hidden;
  max-height: calc(12px * 1.55 * 2);
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dashboard-agent-avatar.role-avatar-wrap {
  position: absolute;
  top: 18px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(47, 115, 255, 0.28);
  border-radius: 15px;
  padding: 4px;
  background: transparent;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.76),
    0 12px 24px rgba(47, 115, 255, 0.13);
}

.dashboard-agent-avatar.role-avatar-wrap::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(47, 115, 255, 0.24);
  border-radius: 13px;
  pointer-events: none;
}

.dashboard-agent-avatar .role-avatar-img,
.dashboard-agent-avatar .role-avatar-svg {
  width: 92%;
  height: 92%;
  margin: 0;
  object-fit: contain;
  object-position: center center;
  transform: translate(2px, 3px);
}

.dashboard-agent-avatar .role-avatar-img {
  mix-blend-mode: multiply;
}

.dashboard-work-list article {
  padding: 0;
}

.dashboard-work-list button {
  display: grid;
  gap: 4px;
  width: 100%;
  border-radius: inherit;
  padding: 10px 12px;
  background: transparent;
  transition:
    background 0.16s ease,
    transform 0.16s ease;
}

.dashboard-asset-actions button {
  border-color: #e5edfb;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.dashboard-asset-actions button:hover {
  border-color: #cfe0ff;
  background: #f4f8ff;
  transform: translateY(-1px);
}

.dashboard-employee-list button {
  grid-template-columns: minmax(160px, 1.35fr) minmax(90px, 0.8fr) auto;
  width: 100%;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.16s ease,
    transform 0.16s ease;
}

.dashboard-employee-list button:hover {
  background: #eef6ff;
  transform: translateY(-1px);
}

.dashboard-employee-list button:disabled {
  cursor: default;
  transform: none;
}

.dashboard-employee-list strong {
  display: grid;
  gap: 2px;
}

.dashboard-employee-list small {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-employee-list em {
  text-align: right;
}

.dashboard-announcement-list article {
  display: grid;
  gap: 5px;
  border-left: 3px solid #2f73ff;
}

.dashboard-announcement-list article div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dashboard-announcement-list article span {
  flex: 0 0 auto;
  width: max-content;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-announcement-list article strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-announcement-list p {
  margin: 0;
}

.dashboard-lesson-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(170px, 230px);
  gap: 12px;
  align-items: center;
}

.dashboard-lesson-list > article > span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 26px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
}

.dashboard-lesson-list strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.dashboard-lesson-list button {
  grid-column: 2;
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.dashboard-lesson-list figure {
  grid-row: 1 / span 2;
  grid-column: 3;
  align-self: stretch;
  overflow: hidden;
  min-height: 92px;
  max-height: 118px;
  margin: 0;
  border-radius: 8px;
  background: #eaf2ff;
}

.dashboard-lesson-list figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-tutorial-panel {
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.dashboard-tutorial-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-tutorial-heading span {
  color: #19a7e8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.dashboard-tutorial-heading h2 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
}

.dashboard-tutorial-heading p {
  margin: 0;
  max-width: 420px;
  color: #64748b;
  text-align: right;
}

.dashboard-tutorial-stage {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
  border: 1px solid #dbeaff;
  border-radius: 22px;
  background: linear-gradient(90deg, rgba(240, 249, 255, 0.94), #ffffff 32%, #eef8ff);
}

.dashboard-tutorial-tabs {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border-right: 1px solid #dbeaff;
}

.dashboard-tutorial-tabs button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 12px;
  align-items: center;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.dashboard-tutorial-tabs button:hover,
.dashboard-tutorial-tabs button.active {
  border-color: #7ed3ff;
  background: linear-gradient(135deg, #e1f2ff, #ffffff);
  transform: translateY(-1px);
}

.dashboard-tutorial-tabs button > span {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #eef8ff;
  color: #168ed0;
  font-size: 14px;
  font-weight: 900;
}

.dashboard-tutorial-tabs strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.dashboard-tutorial-tabs small {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-tutorial-preview {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 360px;
  margin: 18px 18px 18px 0;
  border: 1px solid #dcecff;
  border-radius: 20px;
  background: #eef6ff;
  box-shadow: 0 24px 58px rgba(37, 71, 123, 0.12);
}

.dashboard-tutorial-media {
  position: absolute;
  inset: 0;
}

.dashboard-tutorial-preview img,
.dashboard-tutorial-preview video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.dashboard-tutorial-preview::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.62));
}

.dashboard-tutorial-preview figcaption {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 1;
  display: grid;
  max-width: min(520px, calc(100% - 32px));
  gap: 7px;
  color: #fff;
  text-align: right;
}

.dashboard-tutorial-preview figcaption strong,
.dashboard-tutorial-preview figcaption span {
  color: #fff;
}

.dashboard-tutorial-preview figcaption button {
  justify-self: end;
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

@media (max-width: 1180px) {
  .dashboard-tutorial-stage {
    grid-template-columns: 1fr;
  }

  .dashboard-tutorial-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid #dbeaff;
  }

  .dashboard-tutorial-preview {
    margin: 0 18px 18px;
  }
}

@media (max-width: 720px) {
  .dashboard-tutorial-heading {
    display: grid;
  }

  .dashboard-tutorial-heading p {
    text-align: left;
  }

  .dashboard-tutorial-tabs {
    grid-template-columns: 1fr;
  }

  .dashboard-tutorial-preview,
  .dashboard-tutorial-preview img,
  .dashboard-tutorial-preview video {
    min-height: 220px;
  }
}

.group-card h3 {
  margin: 0 0 6px;
}

.group-project-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.group-project-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.group-project-create-actions {
  display: none;
}

.group-project-heading-row .section-heading {
  flex: 1 1 auto;
}

.group-project-status-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.group-project-status-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid #d8e6ff;
  border-radius: 6px;
  padding: 0 11px;
  background: #fff;
  color: #5b6b82;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.group-project-status-tabs button.active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.group-project-status-tabs em {
  min-width: 18px;
  border-radius: 999px;
  padding: 2px 5px;
  background: #edf3ff;
  color: #60708a;
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.group-project-status-tabs button.active em {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.group-project-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(320px, 42%);
  border: 1px solid #d8e6ff;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}

.group-project-search span {
  color: #77859a;
  font-size: 11px;
  white-space: nowrap;
}

.group-project-search input {
  min-width: 0;
  width: 100%;
  height: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 12px;
  outline: 0;
}

.group-card {
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  min-height: 246px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.group-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #7c3cff, #26c3ff);
  content: "";
}

.group-card.completed::before {
  background: #22a06b;
}

.group-card.failed::before {
  background: #e5484d;
}

.group-card:hover {
  border-color: #b9d1ff;
  box-shadow: 0 18px 44px rgba(47, 115, 255, 0.16);
  transform: translateY(-2px);
}

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

.group-card-heading h3 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-project-state {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  background: #edf4ff;
  color: #2f73ff;
  font-size: 10px;
  font-weight: 850;
}

.group-project-state.completed {
  background: #e8f8f0;
  color: #168a59;
}

.group-project-state.failed {
  background: #fff0f0;
  color: #c93439;
}

.group-card-top {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.group-card-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #eef4ff, #e8fbff);
  color: #2f73ff;
  font-size: 22px;
  font-weight: 900;
}

.group-card p,
.info-box {
  color: var(--muted);
  line-height: 1.7;
}

.group-card-top p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.group-card-progress {
  display: grid;
  gap: 6px;
}

.group-card-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #718096;
  font-size: 11px;
}

.group-card-progress strong {
  color: #24324a;
  font-size: 12px;
}

.group-card-progress > i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf0fa;
}

.group-card-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2f73ff;
}

.group-card.completed .group-card-progress b {
  background: #22a06b;
}

.group-card.failed .group-card-progress b {
  background: #e5484d;
}

.group-requirement-preview {
  display: -webkit-box;
  min-height: 50px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.group-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-card-meta span {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.group-project-notice {
  display: grid;
  gap: 3px;
  border-left: 3px solid #22a06b;
  padding: 8px 10px;
  background: #f3fbf7;
}

.group-project-notice.failed {
  border-left-color: #e5484d;
  background: #fff6f6;
}

.group-project-notice strong {
  color: #26344c;
  font-size: 11px;
}

.group-project-notice span {
  color: #718096;
  font-size: 11px;
  line-height: 1.5;
}

.group-project-empty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 250px;
  place-content: center;
  border: 1px dashed #bfd2f5;
  border-radius: 8px;
  padding: 34px;
  background: #f8fbff;
  text-align: center;
}

.group-project-empty.filtered {
  min-height: 190px;
  background: #fff;
}

.group-project-empty-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #eaf2ff;
  color: #2f73ff;
  font-size: 24px;
}

.group-project-empty-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.group-project-empty strong {
  color: #17233a;
  font-size: 17px;
}

.group-project-empty p {
  max-width: 520px;
  margin: 0;
  color: #718096;
  font-size: 12px;
  line-height: 1.7;
}

.group-project-empty > div {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.group-member-strip {
  display: flex;
  align-items: center;
  min-height: 52px;
}

.group-member-avatar.role-avatar-wrap {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  margin-right: -10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.group-member-avatar .role-avatar-img,
.group-member-avatar .role-avatar-svg {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.group-member-strip em {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-left: 4px;
  border-radius: 999px;
  background: #edf4ff;
  color: #2f73ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.group-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.group-card-footer strong {
  color: var(--muted);
  font-size: 12px;
}

.group-card-footer .secondary-button {
  height: 34px;
  padding: 0 14px;
}

.group-card-footer .create-button {
  min-height: 34px;
  padding: 0 14px;
}

@media (max-width: 760px) {
  .group-project-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .group-project-status-tabs {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .group-project-status-tabs button {
    flex: 0 0 auto;
  }

  .group-project-search {
    min-width: 0;
    width: 100%;
  }

  .group-project-empty {
    min-height: 220px;
    padding: 24px 18px;
  }

  .group-project-empty > div {
    align-items: stretch;
    flex-direction: column;
    width: min(280px, 100%);
  }
}

.group-chat-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  height: calc(100vh - 88px);
  min-height: 620px;
}

.app-layout.group-chat-view-mode #groupChatPage {
  margin-top: 10px;
}

.app-layout.group-chat-view-mode .group-chat-layout {
  height: calc(100vh - 34px);
}

@media (max-width: 1100px) {
  .group-chat-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
}

.group-side-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(243, 248, 255, 0.96), rgba(255, 255, 255, 0.98)),
    #fff;
  box-shadow: 0 18px 40px rgba(37, 71, 123, 0.1);
}

.group-side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.group-side-name {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.group-side-title strong {
  overflow: hidden;
  color: #4b5563;
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-side-collapse-button {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 15px;
}

.group-requirement-shell {
  position: relative;
}

.group-requirement-shell #renameGroupButton {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  min-width: 28px;
  height: 26px;
  border: 1px solid #d8e6ff;
  border-radius: 999px;
  padding: 0;
  background: #fff;
  color: #2f73ff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.group-side-title .secondary-button {
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
}

.group-requirement {
  border: 1px solid #e6eefb;
  border-radius: 8px;
  padding: 14px 48px 14px 14px;
  background:
    linear-gradient(135deg, rgba(47, 115, 255, 0.08), rgba(28, 184, 255, 0.06)),
    #f8fbff;
}

.group-requirement strong,
.group-side-panel h2 {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
}

.group-requirement p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.group-side-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.group-side-panel select {
  height: 44px;
  border: 1px solid #d9e5f7;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  font-weight: 800;
}

.group-member-list {
  display: grid;
  gap: 10px;
}

.group-member-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.group-member-heading > div {
  display: grid;
  gap: 2px;
}

.group-member-heading > div > span {
  color: #7a8ba2;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.group-member-heading h2 {
  margin: 0;
}

.group-agent-match-button {
  min-height: 27px;
  border: 1px solid #b9d2ff;
  border-radius: 999px;
  padding: 0 10px;
  background: linear-gradient(135deg, #fafdff, #e8f2ff);
  color: #2569e9;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 7px 15px rgba(47, 115, 255, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.group-agent-match-button:hover:not(:disabled),
.group-agent-match-button:focus-visible:not(:disabled) {
  border-color: #6fa4ff;
  box-shadow: 0 11px 22px rgba(47, 115, 255, 0.2);
  outline: none;
  transform: translateY(-1px);
}

.group-agent-match-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.group-member {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 76px;
  border: 1px solid #dce8fb;
  border-radius: 10px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.98)),
    #fff;
  box-shadow: 0 10px 22px rgba(47, 115, 255, 0.06);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.group-member:hover {
  z-index: 3;
  transform: translateY(-2px);
  border-color: #8eb8ff;
  box-shadow: 0 18px 30px rgba(47, 115, 255, 0.14);
}

.group-member.manager {
  border-color: #adc8ff;
  background:
    linear-gradient(135deg, rgba(47, 115, 255, 0.1), rgba(255, 255, 255, 0.98)),
    #fff;
}

.group-member-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.group-member-remove,
.group-member-replace {
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.group-member-remove {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ff4d67;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  opacity: 0.55;
  transform: none;
  box-shadow: 0 8px 18px rgba(255, 77, 103, 0.28);
}

.group-member-replace {
  height: 20px;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  padding: 0 8px;
  background: #fff;
  color: #2f73ff;
  font-size: 10px;
  font-weight: 900;
  opacity: 0.65;
}

.group-member:hover .group-member-remove,
.group-member:hover .group-member-replace {
  opacity: 1;
}

.group-member-replace:hover {
  box-shadow: 0 8px 16px rgba(47, 115, 255, 0.12);
}

.group-member-avatar.role-avatar-wrap {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.group-member-mention {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.group-member-mention:hover .group-member-avatar {
  filter: drop-shadow(0 8px 12px rgba(47, 115, 255, 0.16));
}

.group-member-avatar .role-avatar-img,
.group-member-avatar .role-avatar-svg {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  border-radius: 0;
}

.member-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
}

.group-member strong,
.group-member small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-member small {
  margin-top: 3px;
  color: var(--muted);
}

.group-member em {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  background: #edf4ff;
  color: #2f73ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.group-member-copy {
  min-width: 0;
}

.group-member-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
}

.dissolve-group-button {
  justify-self: start;
  width: 128px;
  margin-top: auto;
}

.group-workflow-card {
  display: grid;
  gap: 14px;
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(47, 115, 255, 0.08), rgba(33, 185, 255, 0.03)),
    #fff;
  box-shadow: 0 14px 32px rgba(37, 71, 123, 0.08);
}

.group-workflow-card > strong,
.workflow-card-title strong {
  color: #6b7b93;
  font-size: 13px;
}

.workflow-card-title small {
  display: block;
  margin-top: 4px;
  color: #2f73ff;
  font-size: 11px;
  font-weight: 900;
}

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

.workflow-card-title b {
  color: var(--blue);
  font-size: 20px;
  line-height: 1;
}

.workflow-current {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f4f8ff;
}

.workflow-current span,
.workflow-owner span {
  color: #6b7b93;
  font-size: 12px;
  font-weight: 900;
}

.workflow-current b {
  color: var(--blue);
  font-size: 18px;
}

.workflow-owner {
  display: grid;
  grid-template-columns: 46px minmax(190px, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.workflow-owner-avatar {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 14px;
  background: #eef5ff;
  box-shadow: inset 0 0 0 1px #dbe8ff;
}

.workflow-owner em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-owner b {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-owner em {
  color: #6b7b93;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.workflow-steps {
  position: relative;
  display: grid;
  gap: 2px;
  padding-left: 2px;
}

.workflow-steps::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 13px;
  width: 2px;
  border-radius: 999px;
  background: #dbe8ff;
}

.workflow-steps span {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  color: #7b8aa1;
  font-size: 12px;
  font-weight: 900;
}

.workflow-steps i {
  position: relative;
  z-index: 1;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: #eef5ff;
  color: #7b8aa1;
  font-style: normal;
}

.workflow-steps b {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-steps span.done i,
.workflow-steps span.active i {
  background: linear-gradient(135deg, #2f73ff, #21b9ff);
  color: #fff;
}

.workflow-steps span.active {
  color: var(--blue);
}

.workflow-node-motion {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 24%, transparent 25%),
    conic-gradient(from 0deg, #2f73ff, #22d3ee, #8ab7ff, #2f73ff);
  box-shadow: 0 0 0 4px rgba(47, 115, 255, 0.1);
  animation: workflowNodeSpin 1.05s linear infinite;
}

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

.group-chat-panel {
  position: relative;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  background:
    radial-gradient(circle at 14% 0%, rgba(47, 115, 255, 0.12), transparent 30%),
    radial-gradient(circle at 92% 14%, rgba(26, 184, 255, 0.1), transparent 30%),
    #fff;
  box-shadow: 0 20px 46px rgba(37, 71, 123, 0.1);
}

.group-chat-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e3ecfb;
  padding: 16px 20px;
  background:
    linear-gradient(135deg, rgba(47, 115, 255, 0.1), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.88);
}

.group-chat-hero span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.group-chat-hero strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
}

.group-chat-meta {
  display: none;
}

.group-chat-meta span {
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: #5b6b84;
}

.group-chat-panel .chat-messages {
  min-height: 0;
  align-content: start;
  gap: 14px;
  padding: 14px 16px 22px 24px;
  overflow: auto;
  background:
    linear-gradient(rgba(47, 115, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 115, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
}

.group-workspace-section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.group-workspace-section > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.92);
}

.group-workspace-section > header strong {
  color: #172033;
  font-size: 13px;
  font-weight: 950;
}

.group-workspace-stage {
  border-bottom: 1px solid rgba(216, 230, 255, 0.9);
  padding-bottom: 14px;
}

.group-dialogue-stream {
  padding-bottom: 8px;
}

.group-dialogue-empty {
  border: 1px dashed #cfe0ff;
  border-radius: 8px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.86);
  color: #718099;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.group-message-row {
  display: grid;
  align-items: start;
  gap: 10px;
  width: auto;
  max-width: 92%;
}

.group-message-row.agent,
.group-message-row.system {
  grid-template-columns: 36px minmax(0, 1fr);
  justify-self: start;
}

.group-message-row.system {
  width: auto;
}

.group-message-row.user {
  grid-template-columns: minmax(0, 1fr) 36px;
  justify-self: end;
  width: auto;
  max-width: 92%;
  margin-right: 0;
}

.group-chat-avatar {
  position: relative;
  z-index: 3;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #eaf2ff;
  color: #2f73ff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(37, 71, 123, 0.12);
}

.group-chat-avatar.role-avatar-wrap {
  width: 36px;
  height: 36px;
}

.group-chat-avatar .role-avatar-img,
.group-chat-avatar .role-avatar-svg {
  width: 100%;
  height: 100%;
}

.group-chat-avatar.user {
  background: #dcecff;
  color: #1f5fd8;
}

.group-chat-avatar.system {
  background: #eef4ff;
  color: #64748b;
}

.group-message-row .message-stack {
  width: 100%;
  max-width: 100%;
}

.group-message-mobile-identity {
  display: none;
}

.group-message-row.user .message.user {
  margin-right: 0;
}

.group-message {
  position: relative;
  border: 1px solid rgba(206, 219, 240, 0.78);
  box-shadow: 0 12px 28px rgba(35, 52, 84, 0.08);
}

.group-message.system {
  justify-self: start;
  width: 100%;
  max-width: 100%;
  border-color: #c7dcff;
  background: #eef4ff;
}

.system-stack {
  width: 100%;
  max-width: 100%;
  justify-self: start;
}

.group-message.agent {
  border-top-left-radius: 3px;
  background: linear-gradient(135deg, #f8fbff, #eef5ff);
}

.group-message.manager {
  border-color: #c7dcff;
  background: linear-gradient(135deg, #f8fbff, #edf5ff);
}

.group-message.active {
  border-color: #bad4ff;
  background:
    radial-gradient(circle at 100% 0%, rgba(33, 185, 255, 0.1), transparent 28%),
    linear-gradient(135deg, #f9fcff, #edf5ff);
}

.group-message.summary {
  border-color: #b7d2ff;
  background:
    linear-gradient(135deg, rgba(47, 115, 255, 0.1), rgba(255, 255, 255, 0.86)),
    #f5f9ff;
}

.group-message-mode {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.group-message-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  min-height: 21px;
}

.group-message-head strong {
  display: inline;
  margin: 0;
}

.group-message-head.user-head {
  justify-content: flex-end;
  min-height: 16px;
  margin-bottom: 5px;
}

.group-message-date {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  color: #8b98ad;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.group-message:hover .group-message-date {
  opacity: 0.76;
}

.group-message.user .group-message-date {
  color: rgba(255, 255, 255, 0.9);
}

.group-message.user:hover .group-message-date {
  opacity: 1;
}

.group-intake-message {
  width: 100%;
  max-width: 100%;
  padding: 0 0 10px;
}

.group-intake-card,
.group-intake-complete {
  overflow: hidden;
  border: 1px solid #bfd4f4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(35, 52, 84, 0.08);
}

.group-intake-card > header {
  padding: 18px 20px;
  border-bottom: 1px solid #deebf8;
  background: #f6faff;
}

.group-intake-card > header span,
.group-intake-case > div > span,
.group-intake-complete > div > span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 900;
}

.group-intake-card > header span::after {
  content: " / 智能选项";
  color: #7a8aa2;
  font-weight: 800;
}

.group-intake-card h3,
.group-intake-complete h3 {
  margin: 5px 0;
  color: #1d2939;
  font-size: 18px;
}

.group-intake-card header p,
.group-intake-complete p {
  margin: 0;
  color: #63748c;
  font-size: 12px;
  line-height: 1.65;
}

.group-intake-analyzer {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  border-radius: 999px;
  padding: 6px 10px;
  background: #edf5ff;
  color: #2f73ff;
  font-size: 10px;
  font-weight: 900;
}

.group-intake-analyzer.generating {
  background: #fff7e8;
  color: #b66a00;
}

.group-intake-analyzer.error {
  background: #fff0f0;
  color: #c24141;
}

.group-intake-analyzer.local {
  background: #f2f5fa;
  color: #738198;
}

.group-intake-card form {
  display: grid;
}

.group-intake-field {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #e5edf7;
  padding: 16px 20px;
}

.group-intake-field legend {
  width: 100%;
  padding: 0;
}

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

.group-intake-field-title strong {
  color: #29384f;
  font-size: 13px;
}

.group-intake-field-title em {
  color: #8695a9;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.group-intake-helper {
  color: #7b8aa1;
  font-size: 11px;
  line-height: 1.5;
}

.group-intake-field textarea,
.group-intake-field select {
  width: 100%;
  border: 1px solid #cad9ed;
  border-radius: 7px;
  padding: 11px 13px;
  outline: none;
  background: #fff;
  color: #26364d;
  font: inherit;
  font-size: 12px;
  line-height: 1.65;
}

.group-intake-field textarea {
  min-height: 92px;
  resize: vertical;
}

.group-intake-field textarea:focus,
.group-intake-field select:focus {
  border-color: #6fa3ff;
  box-shadow: 0 0 0 3px rgba(47, 115, 255, 0.1);
}

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

.group-intake-options label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  border: 1px solid #d7e3f3;
  border-radius: 7px;
  padding: 10px 12px;
  background: #fbfdff;
  color: #42536b;
  font-size: 11px;
  cursor: pointer;
}

.group-intake-options label.selected,
.group-intake-options label:has(input:checked) {
  border-color: #2f73ff;
  background: #edf5ff;
  color: #1d55d9;
  box-shadow: 0 8px 18px rgba(47, 115, 255, 0.1);
}

.group-intake-options label.recommended b {
  margin-left: auto;
  border-radius: 999px;
  padding: 3px 7px;
  background: #e9f2ff;
  color: #2f73ff;
  font-size: 9px;
  font-weight: 900;
}

.group-intake-options input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: #2f73ff;
}

.group-intake-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  background: #f8fbff;
}

.group-intake-actions small {
  color: #718099;
  font-size: 10px;
}

.group-intake-actions button,
.group-intake-complete button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 7px;
  padding: 10px 14px;
  background: #2f73ff;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.group-intake-readiness {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  margin: 14px 0 0;
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
}

.group-intake-readiness.ready {
  border-color: #bae8d4;
  background: #f5fcf9;
}

.group-intake-readiness.warn {
  border-color: #ffe0a8;
  background: #fffaf0;
}

.group-intake-readiness > div {
  display: grid;
  align-content: center;
  gap: 5px;
}

.group-intake-readiness > div span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 900;
}

.group-intake-readiness > div strong {
  color: #1d2939;
  font-size: 17px;
}

.group-intake-readiness > div em {
  color: #6c7b91;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.group-intake-readiness ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.group-intake-readiness li {
  display: grid;
  gap: 3px;
  border-radius: 7px;
  padding: 9px 10px;
  background: #fff;
  color: #42536b;
}

.group-intake-readiness li b {
  color: #25344b;
  font-size: 11px;
}

.group-intake-readiness li span {
  color: #6b7b92;
  font-size: 10px;
  line-height: 1.5;
}

.group-intake-case {
  margin-top: 12px;
  border: 1px solid #bfe6d7;
  border-left: 4px solid #18a675;
  border-radius: 8px;
  padding: 16px 18px;
  background: #f5fcf9;
}

.group-intake-case h4 {
  margin: 4px 0 0;
  color: #1f3b33;
  font-size: 15px;
}

.group-intake-case p {
  margin: 10px 0;
  color: #4d665e;
  font-size: 11px;
  line-height: 1.65;
}

.group-intake-case ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: #405a52;
  font-size: 11px;
}

.group-intake-case footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.group-intake-case footer span {
  border: 1px solid #bfe6d7;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
  color: #16805d;
  font-size: 9px;
  font-weight: 800;
}

.group-intake-boundary {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.group-intake-boundary span {
  border: 1px solid #d8e6dd;
  border-radius: 7px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.75);
  color: #405a52;
  font-size: 10px;
  line-height: 1.45;
}

.group-intake-complete {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 20px;
}

.group-intake-complete > div {
  min-width: 0;
}

.group-task-plan-message {
  width: 100%;
  max-width: 100%;
  padding: 0 0 10px;
}

.group-task-plan-card {
  overflow: hidden;
  border: 1px solid #9fc0f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(35, 52, 84, 0.09);
}

.group-task-plan-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #dce9f8;
  background: #f3f8ff;
}

.group-task-plan-card > header > div:first-child {
  min-width: 0;
}

.group-task-plan-card header span {
  color: #2f73ff;
  font-size: 12px;
  font-weight: 900;
}

.group-task-plan-card h3 {
  margin: 5px 0;
  color: #1d2939;
  font-size: 18px;
}

.group-task-plan-card header p {
  margin: 0;
  color: #63748c;
  font-size: 13px;
  line-height: 1.6;
}

.group-task-plan-countdown {
  display: grid;
  flex: 0 0 92px;
  place-items: center;
  border: 1px solid #b8d2fb;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.group-task-plan-countdown strong {
  color: #245fd5;
  font-size: 25px;
  line-height: 1;
}

.group-task-plan-countdown span {
  margin-top: 5px;
  color: #6f8099;
  font-size: 11px;
}

.group-task-plan-card > ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.group-task-plan-card > ol li {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e8eef7;
  padding: 13px 20px;
}

.group-task-plan-card > ol li i {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #eaf2ff;
  color: #2f73ff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.group-task-plan-card > ol li div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.group-task-plan-card > ol li strong {
  color: #27364c;
  font-size: 14px;
}

.group-task-plan-card > ol li span {
  color: #74839a;
  font-size: 12px;
}

.group-task-plan-card > ol li p {
  margin: 4px 0 0;
  color: #52647c;
  font-size: 12px;
  line-height: 1.55;
}

.group-task-plan-card > ol li em {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  background: #edf5ff;
  color: #2f73ff;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.group-task-plan-card > ol li em.attention {
  background: #fff5da;
  color: #a56300;
}

.group-task-plan-card > ol li em.blocked {
  background: #fff1f2;
  color: #be123c;
}

.group-task-plan-phases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  border-bottom: 1px solid #e5edf7;
  padding: 12px 18px;
  background: #fbfdff;
}

.group-task-plan-mode {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e5edf7;
  padding: 14px 20px;
  background: #f8fbff;
}

.group-task-plan-mode > div {
  display: grid;
  flex: 1 1 auto;
  gap: 3px;
  min-width: 180px;
}

.group-task-plan-mode strong {
  color: #24344b;
  font-size: 13px;
}

.group-task-plan-mode span,
.group-task-plan-mode label {
  color: #65758d;
  font-size: 12px;
}

.group-task-plan-mode label {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.group-task-plan-mode input[type="radio"] {
  accent-color: #2f73ff;
}

.group-task-plan-mode select {
  border: 1px solid #cad9ed;
  border-radius: 6px;
  padding: 7px 9px;
  background: #fff;
  color: #2d3c52;
  font: inherit;
}

.group-task-plan-routing {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px !important;
}

.group-task-plan-routing b {
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef5ff;
  color: #326ad5;
  font-size: 10px;
  font-weight: 700;
}

.group-task-plan-phases article {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe8f8;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.group-task-plan-phases span {
  color: #2f73ff;
  font-size: 12px;
  font-weight: 900;
}

.group-task-plan-phases strong {
  color: #172033;
  font-size: 18px;
}

.group-task-plan-phases small,
.group-task-plan-handoff {
  color: #718099;
  font-size: 12px;
  line-height: 1.6;
}

.group-task-plan-handoff {
  display: block;
  margin-top: 4px;
}

.group-task-plan-card > ol li.skipped {
  opacity: 0.55;
}

.group-task-plan-card > ol li.skipped strong {
  text-decoration: line-through;
}

.group-task-plan-card > footer,
.group-task-plan-card form > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  background: #f8fbff;
}

.group-task-plan-boundary {
  display: grid;
  gap: 7px;
  margin: 0 18px 14px;
  border: 1px solid #d9e6f7;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.group-task-plan-boundary strong {
  color: #24344b;
  font-size: 13px;
}

.group-task-plan-boundary span {
  color: #66758d;
  font-size: 12px;
  line-height: 1.6;
}

.group-task-plan-card footer small {
  color: #718099;
  font-size: 12px;
}

.group-task-plan-card footer > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.group-task-plan-card footer button {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 12px;
}

.group-task-plan-edit-list {
  display: grid;
}

.group-task-plan-edit-row {
  display: grid;
  grid-template-columns: 28px minmax(150px, 1fr) minmax(110px, 150px) minmax(140px, 190px) auto auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e8eef7;
  padding: 12px 20px;
}

.group-task-plan-edit-row > span {
  color: #2f73ff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.group-task-plan-edit-row input[type="text"],
.group-task-plan-edit-row input[type="number"],
.group-task-plan-edit-row select {
  min-width: 0;
  border: 1px solid #cad9ed;
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: #2d3c52;
  font: inherit;
  font-size: 12px;
}

.group-task-plan-edit-row input[type="number"] {
  width: 54px;
}

.group-task-plan-edit-row label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #65758d;
  font-size: 10px;
  white-space: nowrap;
}

.group-task-plan-card.running {
  border-color: #a9d9c7;
}

.group-task-plan-card.running > header {
  background: #f4fbf8;
}

.group-task-plan-card.cancelled {
  border-color: #d8dee8;
}

.group-task-plan-card.cancelled > header {
  background: #f7f8fa;
}

.group-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 4px 0;
}

.execution-board {
  display: grid;
  gap: 14px;
  border: 1px solid #d7e5f8;
  border-radius: 8px;
  padding: 16px;
  background: #f8fbff;
  box-shadow: 0 14px 28px rgba(32, 50, 80, 0.06);
}

.execution-board > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.execution-board > header span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 900;
}

.execution-board h3 {
  margin: 4px 0 5px;
  color: #172033;
  font-size: 18px;
}

.execution-board p {
  margin: 0;
  color: #65758d;
  font-size: 11px;
  line-height: 1.6;
}

.execution-board-metrics {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 5px 8px;
  align-items: end;
  min-width: 150px;
  border: 1px solid #dbe8f8;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.execution-board-metrics strong {
  color: #14203a;
  font-size: 20px;
  line-height: 1;
}

.execution-board-metrics span {
  color: #74839a;
  font-size: 9px;
}

.execution-board-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.execution-board-column {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 140px;
  border: 1px solid #e1e9f5;
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.84);
}

.execution-board-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.execution-board-column > header strong {
  color: #24344b;
  font-size: 12px;
}

.execution-board-column > header span {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #eaf2ff;
  color: #2f73ff;
  font-size: 10px;
  font-weight: 900;
}

.execution-board-column > p {
  min-height: 32px;
  color: #7b8aa1;
  font-size: 9px;
}

.execution-board-column > div {
  display: grid;
  gap: 8px;
}

.execution-board-card,
.execution-board-empty {
  display: grid;
  gap: 5px;
  border: 1px solid #dbe7f7;
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}

.execution-board-card strong {
  color: #1f2d45;
  font-size: 11px;
}

.execution-board-card span,
.execution-board-card small,
.execution-board-empty {
  color: #728199;
  font-size: 9px;
  line-height: 1.45;
}

.execution-board-column.blocked .execution-board-card {
  border-color: #ffd0d8;
  background: #fff8f8;
}

.execution-board-column.running .execution-board-card {
  border-color: #b8d2ff;
  background: #f6f9ff;
}

.execution-board-column.done .execution-board-card,
.execution-board-column.deliveries .execution-board-card {
  border-color: #b9e1ce;
  background: #f6fcf9;
}

@media (max-width: 700px) {
  .group-intake-options {
    grid-template-columns: 1fr;
  }

  .group-intake-readiness {
    grid-template-columns: 1fr;
  }

  .group-intake-actions,
  .group-intake-complete {
    align-items: stretch;
    flex-direction: column;
  }

  .group-intake-actions button,
  .group-intake-complete button {
    width: 100%;
  }

  .group-task-plan-card > header,
  .group-task-plan-card > footer,
  .group-task-plan-card form > footer {
    align-items: stretch;
    flex-direction: column;
  }

  .group-task-plan-countdown {
    grid-template-columns: auto auto;
    justify-content: center;
    width: 100%;
  }

  .group-task-plan-countdown span {
    margin: 0 0 0 6px;
  }

  .group-task-plan-edit-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .group-task-plan-edit-row select,
  .group-task-plan-edit-row .group-task-plan-weight,
  .group-task-plan-edit-row label {
    grid-column: 2;
  }

  .group-task-plan-mode {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .group-task-plan-mode > div {
    flex-basis: 100%;
  }

  .group-task-plan-card footer > div,
  .group-task-plan-card footer button {
    width: 100%;
  }

  .execution-board {
    padding: 12px;
  }

  .execution-board > header {
    flex-direction: column;
  }

  .group-parallel-status {
    grid-template-columns: 1fr;
  }

  .group-parallel-status ul {
    justify-content: space-between;
    white-space: normal;
  }

  .execution-task-progress {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .execution-board-metrics {
    width: 100%;
  }

  .execution-board-grid {
    grid-template-columns: repeat(5, minmax(150px, 72vw));
  }
}

.group-next-actions button {
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  padding: 8px 13px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.92));
  color: #2f73ff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(47, 115, 255, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.group-next-actions button:hover {
  transform: translateY(-1px);
  border-color: #7fb0ff;
  box-shadow: 0 14px 26px rgba(47, 115, 255, 0.14);
}

.group-message.system {
  border-color: #cfe0ff;
  background: linear-gradient(135deg, #eef5ff, #e8f1ff);
}

.group-message-row.system .system-stack,
.group-message-row.system .group-message.system {
  width: 100%;
  max-width: 100%;
  justify-self: stretch;
}

.group-message.user {
  border-color: #2f73ff;
  background: linear-gradient(135deg, #2f73ff, #21b9ff);
  box-shadow: 0 14px 30px rgba(47, 115, 255, 0.22);
}

.message-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 4px;
}

.message-actions button {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  color: #8a94a6;
  cursor: pointer;
}

.message-actions button img {
  width: 18px;
  height: 18px;
  display: block;
  opacity: 0.9;
}

.message-actions button img.regenerate-icon {
  width: 16px;
  height: 16px;
}

.message-actions button:hover {
  background: transparent;
  color: var(--blue);
}

.message-actions button.done {
  color: #17b26a;
}

.workflow-chat-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  padding: 2px 2px 0;
}

.workflow-chat-actions span {
  border: 1px solid #d9e7ff;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(245, 249, 255, 0.92);
  color: #70819c;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.workflow-chat-actions button {
  border: 1px solid #2f73ff;
  border-radius: 999px;
  padding: 8px 13px;
  background: #2f73ff;
  color: #fff;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1.25;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(47, 115, 255, 0.18);
  transition: box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.workflow-chat-actions button:hover {
  background: #1f62ef;
  box-shadow: 0 12px 24px rgba(47, 115, 255, 0.24);
  transform: translateY(-1px);
}

.image-intent-confirmation {
  display: grid;
  gap: 16px;
  width: min(100%, 680px);
  box-sizing: border-box;
  margin-top: 12px;
  border: 1px solid #d7e3f5;
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  color: #24344d;
}

.image-intent-confirmation-header,
.image-intent-section-heading,
.image-intent-actions,
.image-intent-planning-copy {
  display: flex;
  align-items: center;
}

.image-intent-confirmation-header {
  justify-content: space-between;
  gap: 16px;
}

.image-intent-confirmation-header h4,
.image-intent-section-heading h5,
.image-intent-detail-group h6 {
  margin: 0;
  color: #22314a;
}

.image-intent-confirmation-header h4 {
  margin-top: 3px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.image-intent-kicker {
  color: #6e7f9a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.image-intent-ready,
.image-intent-section-heading span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  background: #edf4ff;
  color: #2f73ff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.image-intent-summary,
.image-intent-notice {
  margin: 0;
  line-height: 1.65;
}

.image-intent-summary {
  color: #263954;
  font-size: 14px;
  font-weight: 700;
}

.image-intent-notice {
  border-radius: 10px;
  padding: 9px 11px;
  background: #f5f8fc;
  color: #697b96;
  font-size: 12px;
}

.image-intent-overview {
  display: grid;
  gap: 0;
  margin: 0;
  border-block: 1px solid #e5edf8;
}

.image-intent-overview > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 0;
}

.image-intent-overview > div + div {
  border-top: 1px solid #edf2f8;
}

.image-intent-overview dt,
.image-intent-overview dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.image-intent-overview dt {
  color: #7a8aa2;
  font-weight: 700;
}

.image-intent-overview dd {
  color: #31435e;
  font-weight: 700;
}

.image-intent-reference-section {
  display: grid;
  gap: 9px;
}

.image-intent-section-heading {
  justify-content: space-between;
  gap: 12px;
}

.image-intent-section-heading h5 {
  font-size: 13px;
  font-weight: 900;
}

.image-intent-reference-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-block: 1px solid #e5edf8;
}

.image-intent-reference-list.is-long {
  max-height: 420px;
  overflow-y: auto;
}

.image-intent-reference-list > li {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
}

.image-intent-reference-visual {
  position: relative;
  width: 58px;
  min-height: 44px;
}

.image-intent-reference-visual img {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
}

.image-intent-reference-visual img + .image-intent-reference-index {
  position: absolute;
  right: 3px;
  bottom: 3px;
  padding: 3px 5px;
  background: rgba(238, 244, 253, 0.94);
}

.image-intent-reference-list > li + li {
  border-top: 1px solid #edf2f8;
}

.image-intent-reference-index {
  align-self: start;
  border-radius: 9px;
  padding: 6px 7px;
  background: #eef4fd;
  color: #3468bd;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.image-intent-reference-copy {
  min-width: 0;
}

.image-intent-reference-copy strong,
.image-intent-reference-copy em,
.image-intent-reference-copy p,
.image-intent-reference-copy small {
  display: block;
  margin: 0;
  line-height: 1.55;
}

.image-intent-reference-copy em {
  margin-bottom: 3px;
  color: #54749f;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.image-intent-reference-copy strong {
  color: #2b3d58;
  font-size: 13px;
  font-weight: 900;
}

.image-intent-reference-copy p {
  margin-top: 2px;
  color: #536680;
  font-size: 12px;
}

.image-intent-reference-copy small {
  margin-top: 5px;
  color: #7c6670;
  font-size: 11px;
}

.image-intent-reference-copy small b {
  margin-right: 6px;
  color: #9a5b6d;
}

.image-intent-revision > small {
  display: block;
  margin-top: 6px;
  color: #70819a;
  font-size: 11px;
  line-height: 1.5;
}

.image-intent-details {
  border-block: 1px solid #e5edf8;
  padding: 11px 0;
}

.image-intent-details summary {
  color: #405675;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.image-intent-details > div {
  display: grid;
  gap: 13px;
  padding-top: 13px;
}

.image-intent-detail-group h6 {
  font-size: 12px;
  font-weight: 900;
}

.image-intent-detail-group ul,
.image-intent-ambiguities ul {
  display: grid;
  gap: 5px;
  margin: 7px 0 0;
  padding-left: 18px;
}

.image-intent-detail-group li,
.image-intent-ambiguities li {
  color: #5b6d86;
  font-size: 12px;
  line-height: 1.55;
}

.image-intent-ambiguities {
  border-radius: 11px;
  padding: 11px 12px;
  background: #fff5e8;
  color: #7f5324;
}

.image-intent-ambiguities strong {
  font-size: 12px;
  font-weight: 900;
}

.image-intent-ambiguities li {
  color: #7f5b34;
}

.image-intent-revision {
  display: grid;
  gap: 7px;
}

.image-intent-revision label {
  color: #34445f;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.image-intent-confirmation textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid #cbdcf7;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: #22314a;
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
  outline: none;
}

.image-intent-confirmation textarea:focus {
  border-color: #2f73ff;
  box-shadow: 0 0 0 3px rgba(47, 115, 255, 0.12);
}

.image-intent-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.image-intent-confirmation button {
  min-height: 42px;
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.image-intent-confirmation button.secondary {
  border: 1px solid #c9d8ee;
  background: #fff;
  color: #40526f;
}

.image-intent-confirmation button.primary {
  border: 1px solid #2f73ff;
  background: #2f73ff;
  color: #fff;
  box-shadow: 0 10px 22px rgba(47, 115, 255, 0.18);
}

.image-intent-confirmation button.image-intent-confirm-generate {
  border-color: #1769ff;
  background: #1769ff;
  box-shadow: 0 10px 22px rgba(23, 105, 255, 0.3);
}

.image-intent-confirmation button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.image-intent-confirmation button.primary:hover:not(:disabled) {
  background: #1f62ef;
}

.image-intent-confirmation button.image-intent-confirm-generate:hover:not(:disabled) {
  border-color: #0f56d9;
  background: #0f56d9;
}

.image-intent-confirmation button.secondary:hover:not(:disabled) {
  border-color: #9fbae0;
  background: #f7faff;
}

.image-intent-confirmation button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.image-intent-confirmation button:focus-visible {
  outline: 3px solid rgba(47, 115, 255, 0.24);
  outline-offset: 2px;
}

.image-intent-footnote {
  display: block;
  margin-top: -7px;
  color: #7889a3;
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
}

.image-intent-confirmation.is-planning {
  gap: 12px;
}

.image-intent-planning-copy {
  align-items: flex-start;
  gap: 11px;
}

.image-intent-planning-copy > div {
  display: grid;
  gap: 3px;
}

.image-intent-planning-copy strong,
.image-intent-planning-copy small {
  display: block;
}

.image-intent-planning-copy strong {
  color: #31435e;
  font-size: 13px;
}

.image-intent-planning-copy small {
  color: #7889a3;
  font-size: 11px;
  line-height: 1.5;
}

.image-intent-status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  background: #2f73ff;
  box-shadow: 0 0 0 5px rgba(47, 115, 255, 0.1);
}

@media (max-width: 520px) {
  .image-intent-confirmation {
    border-radius: 13px;
    padding: 15px;
  }

  .image-intent-overview > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .image-intent-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .image-intent-confirmation button {
    width: 100%;
    min-height: 44px;
  }

  .image-intent-footnote {
    text-align: left;
  }
}

.chat-starter-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 720px;
  width: min(100%, 720px);
  margin: auto;
  padding: 22px 16px;
  text-align: center;
}

.chat-starter-avatar {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  overflow: hidden;
  border: 6px solid #eef5ff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 24px rgba(37, 71, 123, 0.1);
}

.chat-starter-avatar .role-avatar-img,
.chat-starter-avatar .role-avatar-svg {
  width: 60px;
  height: 60px;
  margin: 0;
  object-fit: contain;
}

.chat-starter-title {
  display: grid;
  gap: 6px;
  max-width: 620px;
}

.chat-starter-title strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.25;
}

.chat-starter-title span {
  color: #6b7a90;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.65;
}

.chat-starter-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: min(100%, 660px);
  margin-top: 4px;
}

.chat-starter-options button {
  width: fit-content;
  max-width: min(100%, 420px);
  min-height: 38px;
  border: 1px solid #dfe7f5;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #526173;
  box-shadow: 0 8px 20px rgba(37, 71, 123, 0.07);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
  white-space: normal;
  transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.chat-starter-options button:hover {
  border-color: #9ec2ff;
  color: var(--blue);
  box-shadow: 0 12px 24px rgba(47, 115, 255, 0.12);
  transform: translateY(-1px);
}

.user-message-context-menu {
  position: fixed;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 2px;
  box-sizing: border-box;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(35, 52, 84, 0.16);
}

.user-message-context-menu button {
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  background: transparent;
  color: #172033;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.user-message-context-menu button:hover {
  background: #eef5ff;
  color: #2f73ff;
}

.user-message-context-menu button.danger {
  color: #d83a5b;
}

.user-message-context-menu button.danger:hover {
  background: #fff1f4;
  color: #c9294d;
}

.message-time {
  justify-self: center;
  margin: 6px 0 2px;
  color: #9aa1ad;
  font-size: 13px;
  font-weight: 700;
}

.table-list {
  display: grid;
  gap: 10px;
}

.admin-category-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
}

.admin-category-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-category-stats article {
  position: relative;
  overflow: hidden;
  border: 1px solid #d7e5ff;
  border-radius: 8px;
  padding: 10px 12px;
  background:
    radial-gradient(circle at 88% 18%, rgba(34, 211, 238, 0.14), transparent 28%),
    #fff;
  box-shadow: 0 8px 18px rgba(37, 71, 123, 0.05);
}

.admin-category-stats article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #2f73ff, #24c2ff);
}

.admin-category-stats span,
.admin-category-stats em {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
}

.admin-category-stats strong {
  display: block;
  margin: 4px 0 2px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.category-admin-list {
  max-height: calc(100vh - 240px);
  overflow: auto;
  padding-right: 4px;
}

.admin-category-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(47, 115, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(37, 71, 123, 0.06);
}

.admin-category-toolbar div {
  display: grid;
  gap: 3px;
}

.admin-category-toolbar strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.admin-category-toolbar span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.admin-category-toolbar button {
  flex: 0 0 auto;
  min-width: 104px;
  height: 38px;
}

.category-admin-card p {
  min-height: 20px;
}

.category-admin-form {
  position: sticky;
  top: 18px;
}

.category-admin-card {
  gap: 8px;
  padding: 12px 14px;
  box-shadow: 0 8px 18px rgba(37, 71, 123, 0.05);
}

.category-admin-card.active {
  box-shadow: 0 10px 22px rgba(47, 115, 255, 0.1);
}

.category-admin-card .admin-resource-head,
.category-admin-card .admin-resource-foot {
  gap: 8px;
}

.category-admin-card .admin-resource-head strong {
  font-size: 14px;
  line-height: 1.25;
}

.category-admin-card .admin-resource-head span,
.category-admin-card p,
.category-admin-card .admin-resource-foot span {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.category-admin-card .admin-resource-head em {
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 800;
}

.category-admin-card .admin-resource-foot div {
  gap: 6px;
}

.category-admin-card .admin-resource-foot button {
  height: 26px;
  border-radius: 5px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

#sceneLevelList,
#enterpriseLevelList {
  gap: 8px;
}

#sceneLevelList .admin-resource-card,
#enterpriseLevelList .admin-resource-card {
  gap: 8px;
  padding: 12px 14px;
  box-shadow: 0 8px 18px rgba(37, 71, 123, 0.05);
}

#enterpriseLevelList .admin-resource-card {
  gap: 6px;
  padding: 10px 12px;
}

#sceneLevelList .admin-resource-card.active,
#enterpriseLevelList .admin-resource-card.active {
  box-shadow: 0 10px 22px rgba(47, 115, 255, 0.1);
}

#sceneLevelList .admin-resource-head,
#sceneLevelList .admin-resource-foot,
#enterpriseLevelList .admin-resource-head,
#enterpriseLevelList .admin-resource-foot {
  gap: 8px;
}

#sceneLevelList .admin-resource-head strong,
#enterpriseLevelList .admin-resource-head strong {
  font-size: 14px;
  line-height: 1.25;
}

#sceneLevelList .admin-resource-head span,
#sceneLevelList .admin-resource-card p,
#sceneLevelList .admin-resource-foot span,
#enterpriseLevelList .admin-resource-head span,
#enterpriseLevelList .admin-resource-card p,
#enterpriseLevelList .admin-resource-foot span {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

#sceneLevelList .admin-resource-head em,
#enterpriseLevelList .admin-resource-head em {
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 800;
}

#sceneLevelList .admin-resource-foot div,
#enterpriseLevelList .admin-resource-foot div {
  gap: 6px;
}

#sceneLevelList .admin-resource-foot button,
#enterpriseLevelList .admin-resource-foot button {
  height: 26px;
  border-radius: 5px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

#enterpriseLevelList .admin-resource-card p {
  overflow: hidden;
  min-height: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-purchase-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border: 1px solid #dce8fb;
  border-radius: 6px;
  padding: 5px 6px 5px 8px;
  background: #f8fbff;
}

.level-purchase-link span {
  overflow: hidden;
  color: #5e6b80;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-purchase-link button {
  height: 22px;
  border: 1px solid #cfe0ff;
  border-radius: 5px;
  padding: 0 7px;
  background: #fff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.admin-data-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.admin-data-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.admin-data-stats article {
  position: relative;
  overflow: hidden;
  border: 1px solid #d7e5ff;
  border-radius: 8px;
  padding: 14px 16px;
  background:
    radial-gradient(circle at 84% 18%, rgba(34, 211, 238, 0.15), transparent 30%),
    linear-gradient(135deg, #fff 0%, #f8fbff 100%);
  box-shadow: 0 12px 28px rgba(37, 71, 123, 0.06);
}

.admin-data-stats article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #2f73ff, #24c2ff);
}

.admin-data-stats span,
.admin-data-stats em {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.admin-data-stats strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.admin-user-list-page,
.user-detail-layout {
  display: grid;
  gap: 16px;
}

.admin-user-filterbar,
.admin-user-batchbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(200px, 0.8fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dce8f7;
  border-radius: 8px;
  background: #fff;
}

.admin-user-filterbar label {
  display: grid;
  gap: 6px;
  color: #52627a;
  font-size: 12px;
  font-weight: 800;
}

.admin-user-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-user-filter-actions button {
  min-width: 96px;
  min-height: 40px;
  white-space: nowrap;
}

.admin-user-filterbar input,
.admin-user-filterbar select,
.admin-user-batchbar input,
.admin-user-tag-row input {
  width: 100%;
  height: 40px;
  border: 1px solid #dce5f1;
  border-radius: 6px;
  padding: 0 12px;
  background: #f9fbfe;
  color: var(--ink);
  font: inherit;
}

.admin-user-batchbar {
  grid-template-columns: auto minmax(220px, 1fr) repeat(3, auto);
  align-items: center;
  border-color: #bfd7ff;
  background: #f4f8ff;
}

.admin-user-batchbar strong {
  color: var(--blue);
  white-space: nowrap;
}

.admin-user-tag-manager {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dce8f7;
  border-radius: 8px;
  background: #fff;
}

.admin-user-tag-manager-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.admin-user-tag-manager-head span {
  display: block;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.admin-user-tag-manager-head strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 18px;
}

.admin-user-tag-manager-head small {
  color: #71819a;
  text-align: right;
}

.admin-user-tag-list {
  display: grid;
  gap: 8px;
}

.admin-user-tag-row {
  display: grid;
  grid-template-columns: 90px minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e5ecf5;
  border-radius: 6px;
  background: #f9fbfe;
}

.admin-user-tag-row > span {
  color: #71819a;
  font-size: 12px;
  font-weight: 700;
}

.admin-user-toolbar,
.user-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-user-toolbar span,
.user-detail-head span,
.user-chat-audit-head span {
  display: block;
  color: var(--blue);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.08em;
}

.admin-user-toolbar strong,
.user-detail-head h1,
.user-chat-audit-head strong {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
}

.admin-user-table {
  overflow: hidden;
  border: 1px solid #e2eaf6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(30, 58, 95, 0.06);
}

.admin-user-row {
  display: grid;
  grid-template-columns: 28px 0.5fr 1.25fr 1.45fr 1.15fr 1.1fr 1.05fr 0.8fr 1.4fr;
  align-items: center;
  min-height: 74px;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid #edf2f8;
  color: #1e293b;
  font-size: 15px;
  font-weight: 800;
}

.admin-user-select {
  display: grid;
  place-items: center;
}

.admin-user-select input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

@media (max-width: 900px) {
  .admin-user-filterbar,
  .admin-user-batchbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-user-tag-manager-head {
    align-items: start;
    flex-direction: column;
  }

  .admin-user-tag-manager-head small {
    text-align: left;
  }

  .admin-user-filter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-tag-row {
    grid-template-columns: 1fr 1fr;
  }

  .admin-user-tag-row input {
    grid-column: 1 / -1;
  }

  .admin-user-table {
    overflow-x: auto;
  }

  .admin-user-row {
    min-width: 980px;
  }
}

.admin-user-row:last-child {
  border-bottom: 0;
}

.admin-user-head {
  min-height: 56px;
  color: #475569;
  font-size: 13px;
  font-weight: 950;
  background: #f8fbff;
}

.admin-user-row .user-id {
  color: var(--blue);
  font-size: 18px;
  font-weight: 1000;
}

.admin-user-row > strong {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.user-row-tags {
  overflow: hidden;
  color: #71819a;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.admin-user-actions button {
  min-width: 68px;
  height: 40px;
  border: 1px solid #dfe8f5;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.admin-user-actions .danger-button {
  border-color: #ffe1e1;
  color: #e98585;
  background: #fff8f8;
}

.admin-user-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.user-detail-layout {
  grid-template-columns: minmax(520px, 1.35fr) minmax(320px, 0.65fr);
  align-items: start;
}

.user-detail-main,
.user-chat-audit-panel {
  border: 1px solid #dce8f7;
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(30, 58, 95, 0.06);
}

.user-detail-form {
  margin-top: 16px;
}

.user-tags-field small {
  color: #71819a;
  font-size: 10px;
  line-height: 1.5;
}

.user-chat-detail-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.user-chat-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.user-chat-detail-toolbar span {
  display: block;
  color: var(--blue);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.08em;
}

.user-chat-detail-toolbar h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 950;
}

.user-chat-audit-panel {
  display: grid;
  gap: 14px;
}

.user-chat-session-list {
  display: grid;
  max-height: min(680px, calc(100vh - 210px));
  overflow: auto;
  gap: 8px;
}

.user-chat-session-list button {
  display: grid;
  gap: 5px;
  border: 1px solid #e2eaf6;
  border-radius: 8px;
  padding: 11px 12px;
  text-align: left;
  background: #f8fbff;
  cursor: pointer;
}

.user-chat-session-list button.active {
  border-color: #9dc2ff;
  background: #edf5ff;
}

.user-chat-session-list strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.user-chat-session-list span {
  color: #738198;
  font-size: 12px;
  font-weight: 800;
}

.user-chat-message-view {
  min-height: min(620px, calc(100vh - 220px));
  border: 1px solid #edf2f8;
  border-radius: 8px;
  background: #fbfdff;
  overflow: hidden;
}

.user-chat-message-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f8;
  background: #fff;
}

.user-chat-message-title strong {
  color: var(--ink);
  font-weight: 950;
}

.user-chat-message-title span {
  color: #738198;
  font-size: 12px;
  font-weight: 800;
}

.user-chat-message-list {
  display: grid;
  align-content: start;
  max-height: min(560px, calc(100vh - 310px));
  overflow: auto;
  gap: 12px;
  padding: 14px;
}

.audit-chat-message {
  display: grid;
  gap: 6px;
  max-width: 92%;
}

.audit-chat-message.user {
  justify-self: end;
}

.audit-chat-message em {
  color: #738198;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.audit-chat-message > div {
  border: 1px solid #e2eaf6;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: #263348;
  font-size: 13px;
  line-height: 1.65;
}

.audit-chat-message.user > div {
  border-color: #9dc2ff;
  color: #fff;
  background: linear-gradient(135deg, #2f73ff, #24a3ff);
}

.admin-chat-diagnostics {
  display: grid;
  gap: 8px;
  border: 1px solid #f1d59a;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffaf0;
  color: #6f4b12;
  font-size: 12px;
  line-height: 1.55;
}

.admin-chat-diagnostics > strong {
  font-size: 12px;
  font-weight: 900;
}

.admin-chat-diagnostic-row {
  display: grid;
  gap: 4px;
  border-top: 1px solid #f5e4bd;
  padding-top: 7px;
}

.admin-chat-diagnostic-row p {
  margin: 0;
}

.admin-chat-diagnostic-row.failed {
  color: #a33a33;
}

.admin-chat-diagnostic-error {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #8f3030;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.admin-order-shell {
  display: grid;
  gap: 14px;
}

.order-summary-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-order-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 110px 150px;
  gap: 10px;
  border: 1px solid #dfe8f6;
  border-radius: 8px;
  padding: 12px;
  background:
    radial-gradient(circle at 94% 20%, rgba(47, 115, 255, 0.08), transparent 28%),
    #fff;
  box-shadow: 0 12px 28px rgba(37, 71, 123, 0.05);
}

.admin-order-toolbar input,
.admin-order-toolbar select,
.admin-order-toolbar button {
  height: 40px;
  border: 1px solid #d7e5ff;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
  outline: none;
}

.admin-order-toolbar input:focus,
.admin-order-toolbar select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 115, 255, 0.12);
}

.admin-order-toolbar button {
  border-color: transparent;
  background: var(--blue);
  color: #fff;
}

.admin-order-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-admin-card {
  min-height: 184px;
}

.order-admin-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.order-admin-body span {
  display: grid;
  gap: 4px;
  border: 1px solid #e4edf9;
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
  color: #708096;
  font-size: 12px;
  font-weight: 850;
}

.order-admin-body strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.order-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 360;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(8px);
}

.order-detail-overlay.hidden {
  display: none;
}

.order-detail-modal {
  position: relative;
  width: min(640px, 100%);
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  padding: 20px;
  background:
    linear-gradient(rgba(47, 115, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 115, 255, 0.035) 1px, transparent 1px),
    #fff;
  background-size: 24px 24px, 24px 24px, auto;
  box-shadow: 0 28px 72px rgba(23, 35, 55, 0.22);
}

.order-detail-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 30px;
  height: 30px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  background: #fff;
  color: #617089;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.order-detail-head {
  padding-right: 42px;
}

.order-detail-head span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.order-detail-head h2 {
  margin: 5px 0 4px;
  color: #172033;
  font-size: 20px;
  line-height: 1.3;
}

.order-detail-head p {
  margin: 0;
  color: #71819a;
  font-size: 13px;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.order-detail-grid div {
  border: 1px solid #dfe8f6;
  border-radius: 8px;
  padding: 11px 12px;
  background: #f8fbff;
}

.order-detail-grid span,
.order-detail-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-detail-grid span {
  color: #71819a;
  font-size: 12px;
  font-weight: 500;
}

.order-detail-grid strong {
  margin-top: 3px;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
}

.order-detail-note {
  margin-top: 12px;
  border: 1px solid #dbe7f8;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: #66758c;
  font-size: 12px;
  line-height: 1.65;
}

.order-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.order-status-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  padding: 12px;
  background: #f5f9ff;
}

.order-status-editor label {
  display: grid;
  gap: 6px;
  color: #617089;
  font-size: 12px;
  font-weight: 700;
}

.order-status-editor select {
  height: 38px;
  border: 1px solid #d7e5ff;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}

.purchase-consult-shell,
.membership-shell {
  display: grid;
  gap: 18px;
}

.purchase-consult-hero,
.membership-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  overflow: hidden;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  padding: 28px;
  background:
    linear-gradient(rgba(47, 115, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 115, 255, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 88% 18%, rgba(34, 211, 238, 0.22), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f4f8ff 100%);
  background-size:
    32px 32px,
    32px 32px,
    auto,
    auto;
  box-shadow: 0 24px 52px rgba(47, 115, 255, 0.1);
}

.purchase-consult-hero p,
.membership-hero p {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
}

.purchase-consult-hero h1,
.membership-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.2;
}

.purchase-consult-hero span,
.membership-hero span {
  display: block;
  max-width: 720px;
  margin-top: 14px;
  color: #65758d;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.8;
}

.purchase-consult-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.purchase-consult-actions button,
.membership-hero button {
  min-width: 150px;
  height: 42px;
}

.purchase-consult-hero aside {
  display: grid;
  align-content: center;
  gap: 12px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
}

.purchase-consult-hero aside strong {
  color: var(--ink);
  font-size: 20px;
}

.purchase-consult-hero aside p {
  color: #65758d;
  font-size: 13px;
  line-height: 1.7;
}

.purchase-consult-hero aside div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #536276;
  font-size: 13px;
  font-weight: 900;
}

.purchase-consult-hero aside div span {
  display: grid;
  width: 26px;
  height: 26px;
  margin: 0;
  place-items: center;
  border-radius: 50%;
  background: #eaf3ff;
  color: var(--blue);
  font-size: 12px;
}

.consult-feature-grid,
.membership-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.consult-feature-grid article,
.membership-plan-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #dfe8f6;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 14px 32px rgba(37, 71, 123, 0.06);
}

.consult-feature-grid article::before,
.membership-plan-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #2f73ff, #24c2ff);
}

.consult-feature-grid strong,
.membership-plan-top span {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.consult-feature-grid span {
  display: block;
  margin-top: 10px;
  color: #65758d;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.7;
}

.membership-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.membership-plan-card {
  display: grid;
  gap: 14px;
  min-height: 360px;
}

.membership-plan-card.active {
  border-color: #8bb7ff;
  box-shadow: 0 20px 44px rgba(47, 115, 255, 0.14);
}

.membership-plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.membership-plan-top em {
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef5ff;
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.membership-plan-card > strong {
  color: #d94b63;
  font-size: 34px;
  line-height: 1;
}

.membership-plan-card > strong small {
  margin-left: 4px;
  color: #708096;
  font-size: 14px;
}

.membership-plan-card p {
  margin: 0;
  color: #65758d;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.7;
}

.membership-benefits {
  display: grid;
  gap: 8px;
}

.membership-benefits span {
  border: 1px solid #e4edf9;
  border-radius: 8px;
  padding: 9px 10px;
  background: #f8fbff;
  color: #536276;
  font-size: 12px;
  font-weight: 900;
}

.membership-plan-card button {
  align-self: end;
  height: 42px;
}

.form-section-title {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid #edf3fb;
  padding-bottom: 12px;
}

.form-section-title span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
}

.form-section-title strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
}

.category-form-tip {
  border: 1px solid #d7e5ff;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.7;
}

.admin-resource-card {
  position: relative;
  display: grid;
  gap: 12px;
  overflow: hidden;
  border: 1px solid #dfe8f6;
  border-radius: 8px;
  padding: 16px;
  background:
    radial-gradient(circle at 92% 10%, rgba(47, 115, 255, 0.1), transparent 26%),
    #fff;
  box-shadow: 0 12px 28px rgba(37, 71, 123, 0.06);
}

.admin-resource-card.active {
  border-color: #8bb7ff;
  box-shadow: 0 16px 34px rgba(47, 115, 255, 0.14);
}

.admin-resource-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #2f73ff, #24c2ff);
}

.admin-resource-head,
.admin-resource-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-resource-head strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.admin-resource-head span,
.admin-resource-card p,
.admin-resource-foot span {
  color: #6b7a90;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
}

.admin-resource-card p {
  margin: 0;
}

.admin-resource-head em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff5f7;
  color: #d94b63;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.admin-resource-head em.configured {
  background: #e9fff1;
  color: #12a979;
}

.admin-resource-foot div {
  display: flex;
  gap: 8px;
}

.admin-resource-foot button {
  height: 32px;
  border: 1px solid #d7e5ff;
  border-radius: 6px;
  padding: 0 12px;
  background: #f4f8ff;
  color: #536276;
  font-weight: 900;
}

.admin-resource-foot button:hover {
  color: var(--blue);
}

.admin-resource-foot button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.user-level-control select {
  height: 32px;
  border: 1px solid #d7e5ff;
  border-radius: 6px;
  padding: 0 10px;
  background: #f8fbff;
  color: #374151;
  font-weight: 900;
  outline: none;
}

.user-level-control select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 115, 255, 0.12);
}

#enterprisePage {
  min-height: calc(100vh - 104px);
  margin: 0;
  padding: 30px;
  background:
    linear-gradient(rgba(55, 180, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 180, 255, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, #071123 0%, #10172f 46%, #111827 100%);
  background-size:
    42px 42px,
    42px 42px,
    auto;
  color: #eef7ff;
}

#enterprisePage .page-title {
  margin-bottom: 22px;
}

#enterprisePage .page-title p {
  color: #55f0ff;
  letter-spacing: 0.08em;
}

#enterprisePage .page-title h1 {
  color: #f8fbff;
  font-size: 32px;
  text-shadow: 0 0 24px rgba(85, 240, 255, 0.28);
}

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

.enterprise-summary article {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(13, 26, 52, 0.92), rgba(24, 40, 82, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 50px rgba(0, 0, 0, 0.28);
}

.enterprise-summary article::after {
  content: "";
  position: absolute;
  right: -20%;
  bottom: 0;
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #55f0ff, #8b5cf6);
  opacity: 0.86;
}

.enterprise-summary span {
  display: block;
  color: #81e6ff;
  font-size: 12px;
  font-weight: 900;
}

.enterprise-summary strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 24px;
}

.enterprise-summary em {
  display: block;
  margin-top: 6px;
  color: #9bb4d6;
  font-size: 12px;
  font-style: normal;
}

.org-chart {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 28px;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 10px;
  padding: 34px;
  background:
    linear-gradient(120deg, rgba(15, 23, 42, 0.94), rgba(15, 34, 68, 0.88)),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.05) 0 1px, transparent 1px 70px);
  box-shadow:
    inset 0 0 60px rgba(56, 189, 248, 0.08),
    0 24px 80px rgba(0, 0, 0, 0.34);
}

.org-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(85, 240, 255, 0.1) 50%, transparent 100%),
    linear-gradient(180deg, transparent 0%, rgba(139, 92, 246, 0.08) 54%, transparent 100%);
  mask-image: linear-gradient(#000, transparent 88%);
}

.org-company {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  min-width: min(520px, 100%);
  border: 1px solid rgba(85, 240, 255, 0.5);
  border-radius: 10px;
  padding: 20px 34px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(47, 115, 255, 0.22), rgba(139, 92, 246, 0.14));
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 42px rgba(85, 240, 255, 0.22);
}

.org-company span,
.org-company em {
  color: #9beaff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.org-company strong {
  margin: 8px 0;
  font-size: 30px;
  font-weight: 900;
}

.org-branches {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 20px;
  width: 100%;
}

.org-department {
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 10px;
  padding: 16px;
  background: rgba(8, 18, 40, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 36px rgba(0, 0, 0, 0.24);
}

.org-department-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.org-department-head > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f73ff, #22d3ee);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.24);
}

.org-department h3,
.org-department p {
  margin: 0;
}

.org-department h3 {
  color: #f8fbff;
}

.org-department p {
  margin-top: 4px;
  color: #8aa8cc;
  font-size: 12px;
}

.org-employees {
  display: grid;
  gap: 10px;
}

.org-employee {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.74);
}

.org-employee strong,
.org-employee small,
.org-employee em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-employee strong {
  color: #eef7ff;
}

.org-employee small,
.org-employee em {
  color: #8aa8cc;
  font-size: 12px;
}

.org-employee em {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 8px;
  font-style: normal;
}

.org-avatar {
  box-shadow: 0 0 20px rgba(85, 240, 255, 0.18);
}

.employee-manage-row {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.org-employee.warning,
.employee-manage-row.warning {
  border-color: #ffd991;
  background: #fffaf0;
}

.org-employee.danger,
.employee-manage-row.danger {
  border-color: #ffc2cf;
  background: #fff5f7;
}

#enterprisePage .org-employee.warning {
  border-color: rgba(251, 191, 36, 0.46);
  background: rgba(72, 43, 12, 0.42);
}

#enterprisePage .org-employee.danger {
  border-color: rgba(251, 113, 133, 0.5);
  background: rgba(73, 18, 38, 0.42);
}

.employee-manage-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.employee-manage-row strong,
.employee-manage-row span,
.employee-manage-row em {
  display: block;
}

.employee-manage-row span {
  margin-top: 4px;
  color: var(--muted);
}

.employee-manage-row em {
  margin-top: 6px;
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.department-manage-card {
  overflow: hidden;
  border: 1px solid #dfe7f5;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #f9fbff 100%);
  box-shadow: var(--shadow);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.department-manage-card.drag-over {
  transform: translateY(-2px);
  border-color: #7eb1ff;
  box-shadow:
    0 18px 42px rgba(47, 115, 255, 0.18),
    inset 0 0 0 2px rgba(47, 115, 255, 0.12);
}

.department-manage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e6edf8;
  padding: 16px 18px;
  background:
    linear-gradient(90deg, rgba(47, 115, 255, 0.08), transparent 58%),
    #fff;
}

.department-manage-head span,
.department-manage-head em {
  color: #6b7a90;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.department-manage-head h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 22px;
}

.department-name-editor {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.department-name-editor input {
  width: min(360px, 42vw);
  height: 40px;
  border: 1px solid #dbe6f6;
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.department-name-editor input:focus {
  border-color: #9ec2ff;
  box-shadow: 0 0 0 4px rgba(47, 115, 255, 0.09);
}

.department-name-editor button {
  height: 40px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  background: #eef5ff;
  padding: 0 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.department-name-editor button:hover {
  border-color: #9ec2ff;
  background: #e5efff;
  transform: translateY(-1px);
}

.department-manage-head em {
  border-radius: 999px;
  padding: 8px 12px;
  background: #eef4ff;
  color: var(--blue);
}

.department-head-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.department-dismiss-button {
  height: 34px;
  border: 1px solid #ffd4dc;
  border-radius: 999px;
  background: #fff5f7;
  padding: 0 14px;
  color: #d92d5a;
  font-size: 12px;
  font-weight: 900;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.department-dismiss-button:hover {
  transform: translateY(-1px);
  border-color: #ffb8c7;
  box-shadow: 0 10px 22px rgba(217, 45, 90, 0.12);
}

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

.department-empty-drop {
  grid-column: 1 / -1;
  display: grid;
  min-height: 84px;
  place-items: center;
  border: 1px dashed #c9daf8;
  border-radius: 8px;
  background: rgba(238, 245, 255, 0.54);
  color: #7b8aa5;
  font-size: 13px;
  font-weight: 800;
}

.department-employee-card {
  position: relative;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 12px 14px;
  align-items: center;
  border: 1px solid #e2e9f6;
  border-radius: 8px;
  padding: 14px 14px 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(30, 64, 175, 0.06);
  cursor: grab;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.department-employee-card:hover {
  transform: translateY(-2px);
  border-color: #c7dcff;
  box-shadow: 0 16px 34px rgba(47, 115, 255, 0.12);
}

.department-employee-card.dragging {
  cursor: grabbing;
  opacity: 0.52;
  transform: scale(0.98);
}

.department-employee-card.drag-target {
  border-color: #2f73ff;
  box-shadow:
    0 18px 36px rgba(47, 115, 255, 0.18),
    inset 4px 0 0 #2f73ff;
}

.add-department-button {
  height: 46px;
  padding: 0 18px;
  box-shadow: 0 14px 30px rgba(47, 115, 255, 0.16);
}

.department-create-row {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 16px;
}

.department-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px) auto;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 16px;
}

.department-toolbar .info-box {
  margin: 0;
}

.department-toolbar .company-fund-card {
  min-height: 0;
}

.department-toolbar .add-department-button {
  align-self: stretch;
}

.role-admin-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.role-admin-list {
  display: grid;
  align-self: stretch;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  contain: size;
  border: 1px solid #dfe7f5;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  box-shadow: var(--shadow);
}

.role-admin-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #e1e9f7;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  text-align: left;
}

.role-admin-item:hover,
.role-admin-item.active {
  border-color: #9ec2ff;
  background: #f5f9ff;
  box-shadow: 0 10px 24px rgba(47, 115, 255, 0.1);
}

.role-admin-item span,
.role-admin-item strong,
.role-admin-item small {
  display: block;
  min-width: 0;
}

.role-admin-item strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-admin-item small {
  overflow: hidden;
  margin-top: 4px;
  color: #7b8aa5;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-admin-add {
  min-height: 48px;
  border: 1px dashed #9ec2ff;
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 16%, rgba(34, 211, 238, 0.14), transparent 30%),
    #f7fbff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 950;
}

.role-admin-add:hover {
  border-style: solid;
  background: #eef6ff;
}

.role-admin-form {
  align-self: start;
}

.role-live-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #dce8ff;
  border-radius: 10px;
  background:
    radial-gradient(circle at 90% 8%, rgba(34, 211, 238, 0.16), transparent 34%),
    #f8fbff;
  padding: 18px;
}

.role-preview-avatar {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 6px solid #eef4ff;
  border-radius: 22px;
  background: #fff;
  image-rendering: pixelated;
}

.role-preview-avatar .role-avatar-img,
.role-preview-avatar .role-avatar-svg {
  width: 82px;
  height: 82px;
  margin: 0;
  object-fit: contain;
  border-radius: 0;
}

.role-live-preview strong,
.role-live-preview span {
  display: block;
}

.role-live-preview strong {
  color: var(--ink);
  font-size: 20px;
}

.role-live-preview span {
  margin-top: 6px;
  color: #7b8aa5;
  font-size: 13px;
  font-weight: 800;
}

.agent-business-sprite-editor {
  display: grid;
  gap: 14px;
  margin: 16px 0;
  border: 1px solid #dce8f7;
  border-radius: 12px;
  padding: 16px;
  background: #f8fbff;
}

.agent-business-sprite-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.agent-business-sprite-head > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.agent-business-sprite-head strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.agent-business-sprite-head span,
.agent-business-sprite-note {
  color: #708096;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

.agent-business-sprite-head em {
  flex: 0 0 auto;
  border-radius: 8px;
  padding: 5px 8px;
  background: #e9f1ff;
  color: #3974c7;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.agent-business-sprite-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.agent-business-sprite-card {
  display: grid;
  min-width: 0;
  gap: 10px;
  border: 1px solid #dfe8f6;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.agent-business-sprite-card.has-custom-image {
  border-color: #a9c8f3;
  background: #fbfdff;
}

.agent-business-sprite-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agent-business-sprite-card-head strong {
  overflow: hidden;
  color: #34445a;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-business-sprite-card-head span {
  flex: 0 0 auto;
  color: #8793a3;
  font-size: 10px;
  font-weight: 750;
}

.agent-business-sprite-card.has-custom-image .agent-business-sprite-card-head span {
  color: #2f73bf;
}

.agent-business-sprite-preview {
  display: grid;
  height: 108px;
  overflow: hidden;
  place-items: center;
  border-radius: 8px;
  background: #f5f7fa;
}

.agent-business-sprite-preview img,
.agent-business-sprite-preview .role-avatar-svg {
  width: 96px;
  height: 96px;
  object-fit: contain;
  image-rendering: pixelated;
}

.agent-business-sprite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-business-sprite-actions .secondary-button {
  min-height: 30px;
  flex: 1 1 54px;
  justify-content: center;
  padding: 5px 8px;
  font-size: 11px;
}

.agent-business-sprite-actions label {
  position: relative;
  cursor: pointer;
}

.agent-business-sprite-actions input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 980px) {
  .agent-business-sprite-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .agent-business-sprite-head {
    display: grid;
  }

  .agent-business-sprite-head em {
    width: fit-content;
  }

  .agent-business-sprite-grid {
    grid-template-columns: 1fr;
  }
}

.role-sprite-editor {
  display: grid;
  gap: 12px;
  border: 1px solid #dce8ff;
  border-radius: 10px;
  padding: 14px;
  background: #f8fbff;
}

.role-business-avatar-editor {
  display: grid;
  gap: 14px;
  border: 1px solid #dce8f7;
  border-radius: 12px;
  padding: 16px;
  background: #f8fbff;
}

.role-business-avatar-copy {
  display: grid;
  gap: 5px;
}

.role-business-avatar-copy strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.role-business-avatar-copy span,
.role-business-avatar-actions small {
  color: #708096;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

.role-business-avatar-workspace {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.role-business-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.role-business-avatar-actions small {
  flex-basis: 100%;
}

.role-business-avatar-editor .business-avatar-preview {
  width: 112px;
  height: 112px;
}

.role-business-avatar-editor .business-avatar-preview .role-avatar-img,
.role-business-avatar-editor .business-avatar-preview .role-avatar-svg {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

@media (max-width: 560px) {
  .role-business-avatar-workspace {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
  }

  .role-business-avatar-editor .business-avatar-preview {
    width: 84px;
    height: 96px;
  }
}

.role-sprite-title {
  display: grid;
  gap: 4px;
}

.role-sprite-title strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.role-sprite-title span {
  color: #708096;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.6;
}

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

.role-sprite-card {
  position: relative;
  display: grid;
  gap: 8px;
  justify-items: center;
  border: 1px solid #dfe8f6;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  cursor: pointer;
}

.role-sprite-card:hover {
  border-color: #9ec2ff;
  box-shadow: 0 10px 22px rgba(47, 115, 255, 0.1);
}

.role-sprite-card span {
  color: #536276;
  font-size: 12px;
  font-weight: 900;
}

.role-sprite-card img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  image-rendering: pixelated;
}

.role-sprite-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.role-sprite-card em {
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef5ff;
  color: var(--blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.department-salary-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  justify-items: end;
  gap: 3px;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  padding: 7px 9px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 245, 255, 0.9));
  box-shadow: 0 10px 22px rgba(47, 115, 255, 0.1);
}

.department-salary-badge span,
.department-salary-badge strong {
  display: block;
  white-space: nowrap;
}

.department-salary-badge span {
  color: #6b7a90;
  font-size: 11px;
  font-weight: 900;
}

.department-salary-badge strong {
  color: #ff315f;
  font-size: 13px;
  font-weight: 900;
}

.department-employee-card.warning {
  border-color: #ffd991;
  background: #fffaf0;
}

.department-employee-card.danger {
  border-color: #ffc2cf;
  background: #fff5f7;
}

.department-employee-avatar {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: #eef5ff;
}

.department-employee-avatar .role-avatar-img {
  width: 72px;
  height: 72px;
  margin: 0;
  object-fit: contain;
  object-position: center;
}

.department-employee-main {
  min-width: 0;
  padding-right: 114px;
}

.department-employee-main strong,
.department-employee-main span,
.department-employee-main em,
.department-employee-main b {
  display: block;
}

.department-employee-main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.department-employee-main span {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.department-employee-main em {
  margin-top: 8px;
  color: #526173;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.department-employee-main b {
  margin-top: 6px;
  color: var(--blue);
  font-size: 12px;
}

.department-auto-renew-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: #526173;
  font-size: 12px;
  font-weight: 800;
}

.department-auto-renew-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.department-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  border-top: 1px solid #eef2f8;
  padding-top: 12px;
}

.department-actions button {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.row-actions button.danger {
  border-color: #ffd4dc;
  color: #d92d5a;
  background: #fff5f7;
}

.pixel-game-shell {
  box-sizing: border-box;
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 3px solid #bcdcff;
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(180deg, #b8efff 0%, #ddf8ff 42%, #f7fcff 100%);
  box-shadow:
    0 5px 0 #9ec8ff,
    0 26px 54px rgba(47, 115, 255, 0.13);
}

.enterprise-scene-viewport {
  position: relative;
  overflow: auto;
  margin-top: 10px;
  border: 3px solid #ffffff;
  border-radius: 6px;
  background: rgba(235, 247, 255, 0.68);
  box-shadow: inset 0 0 0 2px rgba(47, 115, 255, 0.18);
}

.enterprise-scene-surface {
  position: relative;
  min-width: 760px;
  margin: 0 auto;
  transition: width 0.22s ease;
}

.enterprise-canvas {
  display: block;
  width: 100%;
  min-height: 620px;
  border-radius: 3px;
  image-rendering: pixelated;
}

.enterprise-zoom-controls {
  position: absolute;
  right: 22px;
  top: 50%;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateY(-50%);
  border: 2px solid rgba(197, 220, 255, 0.94);
  border-radius: 16px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 4px 0 rgba(159, 194, 255, 0.76),
    0 18px 34px rgba(47, 115, 255, 0.16);
}

.enterprise-zoom-controls button {
  width: 34px;
  height: 34px;
  border: 1px solid #d8e6ff;
  border-radius: 12px;
  background: #f8fbff;
  color: #2f73ff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.enterprise-zoom-controls button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #2f73ff, #22c1ff);
  box-shadow: 0 8px 18px rgba(47, 115, 255, 0.24);
  color: #fff;
}

.enterprise-zoom-controls button[data-enterprise-zoom="reset"] {
  width: 42px;
  font-size: 11px;
}

.enterprise-zoom-controls span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.enterprise-agent-menu {
  position: absolute;
  z-index: 40;
  display: none;
  width: min(240px, calc(100% - 24px));
  transform: translateX(-50%);
  pointer-events: none;
}

.enterprise-hover-card {
  position: absolute;
  z-index: 38;
  display: none;
  width: min(240px, calc(100% - 24px));
  transform: translateX(-50%);
  border: 2px solid #cfe0ff;
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 5px 0 rgba(159, 194, 255, 0.8),
    0 16px 34px rgba(47, 115, 255, 0.18);
  color: #172033;
  pointer-events: none;
}

.enterprise-hover-card.show {
  display: block;
}

.enterprise-hover-card strong,
.enterprise-hover-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-hover-card strong {
  font-size: 15px;
  font-weight: 900;
}

.enterprise-hover-card span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.enterprise-hotspot-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.enterprise-hotspot {
  position: absolute;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.enterprise-hotspot::after {
  content: none;
}

.enterprise-label-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.pixel-game-shell.agent-hovering .enterprise-label-layer {
  opacity: 0.14;
  pointer-events: none;
}

.enterprise-map-label {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid #d8e6ff;
  border-radius: 7px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 4px 0 rgba(159, 194, 255, 0.78),
    0 10px 18px rgba(47, 115, 255, 0.12);
  color: #2f73ff;
  cursor: grab;
  font-size: 14px;
  font-weight: 900;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  white-space: nowrap;
}

.enterprise-map-label.group {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: transparent;
}

.enterprise-map-label:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.03);
}

.enterprise-agent-menu.show {
  display: block;
}

.enterprise-agent-menu.locked {
  pointer-events: auto;
}

.enterprise-agent-card {
  border: 2px solid #cfe0ff;
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 5px 0 rgba(159, 194, 255, 0.8),
    0 16px 34px rgba(47, 115, 255, 0.18);
}

.enterprise-agent-card strong,
.enterprise-agent-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-agent-card strong {
  color: #172033;
  font-size: 15px;
  font-weight: 900;
}

.enterprise-agent-card span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.enterprise-agent-actions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.enterprise-agent-actions button,
.enterprise-agent-actions select {
  width: 100%;
  border: 1px solid #d8e4f8;
  border-radius: 6px;
  background: #fff;
  color: #172033;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.enterprise-agent-actions button {
  padding: 8px 10px;
  background: linear-gradient(135deg, #2f73ff, #55d6ff);
  color: #fff;
  cursor: pointer;
}

.enterprise-agent-actions button.danger {
  border-color: #ffd3db;
  background: linear-gradient(135deg, #ff4d67, #ff8aa0);
}

.enterprise-agent-actions label {
  display: grid;
  gap: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.enterprise-agent-actions select {
  padding: 7px 8px;
}

#enterprisePage {
  min-height: calc(100vh - 56px);
  margin: 0;
  padding: 12px 26px 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.96)),
    linear-gradient(135deg, #d9f6ff 0%, #f4fbff 44%, #eef4ff 100%);
  color: #172033;
}

#enterprisePage .page-title p {
  color: var(--blue);
  letter-spacing: 0;
}

#enterprisePage .page-title h1 {
  color: #111827;
  font-size: 28px;
  text-shadow: none;
}

#enterprisePage .enterprise-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

#enterprisePage .enterprise-summary article {
  border: 3px solid #d8e6ff;
  border-radius: 4px;
  padding: 14px 16px 14px 74px;
  min-height: 108px;
  background:
    radial-gradient(circle at 92% 14%, rgba(47, 115, 255, 0.09), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.94));
  box-shadow:
    0 4px 0 #b8d2ff,
    0 12px 28px rgba(47, 115, 255, 0.1);
}

#enterprisePage .enterprise-summary article::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 18px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(47, 115, 255, 0.14), rgba(34, 211, 238, 0.22)),
    #eef6ff;
  box-shadow:
    0 10px 24px rgba(47, 115, 255, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  color: #2f73ff;
  font-size: 20px;
  font-weight: 900;
}

#enterprisePage .enterprise-summary article::after {
  display: block;
  left: 16px;
  right: auto;
  bottom: 14px;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f73ff, #22d3ee);
  opacity: 0.82;
}

#enterprisePage .enterprise-summary .company::before {
  content: "S";
}

#enterprisePage .enterprise-summary .scale::before {
  content: "▦";
  color: #0f9bb8;
}

#enterprisePage .enterprise-summary .revenue::before {
  content: "¥";
  color: #16a34a;
}

#enterprisePage .enterprise-summary .expense::before {
  content: "↘";
  color: #e85b7d;
}

#enterprisePage .enterprise-summary .scale::after {
  background: linear-gradient(90deg, #0f9bb8, #22d3ee);
}

#enterprisePage .enterprise-summary .revenue::after {
  background: linear-gradient(90deg, #16a34a, #5eead4);
}

#enterprisePage .enterprise-summary .expense::after {
  background: linear-gradient(90deg, #e85b7d, #f59e0b);
}

#enterprisePage .enterprise-summary span {
  color: #6b7c94;
  font-size: 12px;
  font-weight: 900;
}

#enterprisePage .enterprise-summary strong {
  margin-top: 6px;
  color: #14213d;
  font-size: 21px;
  line-height: 1.18;
}

#enterprisePage .enterprise-summary em {
  margin-top: 5px;
  color: #6c7c92;
  font-size: 12px;
}

#enterprisePage .org-chart {
  display: block;
  overflow: visible;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.pixel-office-shell {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
  min-height: 760px;
  border: 4px solid #cce3ff;
  border-radius: 8px;
  padding: 18px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.9) 0 34px, transparent 35px),
    radial-gradient(circle at 72% 8%, rgba(255, 255, 255, 0.76) 0 42px, transparent 43px),
    linear-gradient(180deg, #b8efff 0%, #ddf8ff 36%, #f7fcff 100%);
  box-shadow:
    0 5px 0 #9ec8ff,
    0 26px 54px rgba(47, 115, 255, 0.13);
  image-rendering: pixelated;
}

.pixel-cloud {
  position: absolute;
  width: 104px;
  height: 28px;
  background: #fff;
  box-shadow:
    24px -12px 0 #fff,
    56px -4px 0 #fff,
    84px 0 0 rgba(255, 255, 255, 0.82);
  opacity: 0.88;
}

.cloud-a {
  top: 42px;
  left: 72px;
}

.cloud-b {
  top: 86px;
  right: 110px;
  transform: scale(0.82);
}

.pixel-office-hud {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border: 3px solid #6aa6ff;
  border-radius: 4px;
  padding: 10px 14px;
  background: #fff;
  box-shadow: 0 4px 0 #8bb5ff;
  opacity: 0.96;
}

.pixel-office-hud strong {
  font-size: 20px;
}

.pixel-office-hud small {
  display: block;
  margin-top: 4px;
  color: #7b8ba4;
  font-size: 12px;
  font-weight: 800;
}

.pixel-office-hud span {
  color: #60708a;
  font-size: 13px;
  font-weight: 800;
}

.office-upgrade-button {
  border: 1px solid #bcd5ff;
  border-radius: 12px;
  padding: 9px 14px;
  color: #226ff6;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff, #edf6ff);
  box-shadow: 0 10px 22px rgba(54, 119, 255, 0.12);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.office-upgrade-button:hover {
  transform: translateY(-2px);
  border-color: #6da8ff;
  box-shadow: 0 16px 28px rgba(54, 119, 255, 0.2);
}

.pixel-office-stage {
  position: relative;
  z-index: 1;
  margin: 30px 0 12px;
  width: 100%;
  min-height: clamp(720px, 74vw, 960px);
  perspective: 1200px;
}

.pixel-isometric-base {
  position: absolute;
  inset: 34px 24px 0;
  z-index: 0;
  transform: rotateX(58deg) rotateZ(45deg);
  transform-origin: center;
  border: 5px solid #9dc6ff;
  background:
    linear-gradient(90deg, rgba(164, 118, 48, 0.15) 1px, transparent 1px),
    linear-gradient(rgba(164, 118, 48, 0.15) 1px, transparent 1px),
    linear-gradient(45deg, rgba(255,255,255,.16) 25%, transparent 25% 50%, rgba(255,255,255,.16) 50% 75%, transparent 75%),
    #f8dc94;
  background-size: 30px 30px, 30px 30px, 60px 60px;
  box-shadow:
    18px 18px 0 #75bfff,
    34px 34px 0 #4aa3f7;
}

.pixel-office-map {
  position: relative;
  z-index: 2;
  min-height: clamp(700px, 72vw, 940px);
  padding: 28px 34px 34px;
}

.pixel-scene-props,
.pixel-scene-props i {
  position: absolute;
  display: block;
}

.pixel-scene-props {
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.pixel-scene-props i {
  z-index: 2;
}

.pixel-scene-props .scene-wall {
  z-index: 0;
}

.scene-wall {
  background: #f8fbff;
  border: 4px solid #d7e4f5;
  box-shadow: 0 5px 0 #b8cbe5;
}

.wall-back {
  top: 74px;
  left: 11%;
  width: 78%;
  height: 44px;
  transform: skewX(-24deg);
}

.wall-left {
  top: 116px;
  left: 7%;
  width: 6%;
  height: 55%;
  transform: skewY(-24deg);
}

.scene-floor-zone {
  border: 0;
  opacity: 0.58;
  transform: skewX(-28deg);
}

.zone-left {
  left: 13%;
  top: 39%;
  width: 250px;
  height: 150px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.24) 25%, transparent 25% 50%, rgba(255,255,255,.24) 50% 75%, transparent 75%),
    #bcebd6;
  background-size: 22px 22px;
}

.zone-center {
  left: 38%;
  top: 35%;
  width: 300px;
  height: 170px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.24) 25%, transparent 25% 50%, rgba(255,255,255,.24) 50% 75%, transparent 75%),
    #dbe8ff;
  background-size: 22px 22px;
}

.zone-right {
  right: 12%;
  top: 31%;
  width: 240px;
  height: 148px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.24) 25%, transparent 25% 50%, rgba(255,255,255,.24) 50% 75%, transparent 75%),
    #ffe0a3;
  background-size: 22px 22px;
}

.scene-bookshelf {
  width: 96px;
  height: 70px;
  border: 4px solid #8a5b34;
  background:
    linear-gradient(90deg, #ca8b4c 0 10px, #7c5cff 10px 18px, #f8d36a 18px 28px, #2f73ff 28px 38px, #ca8b4c 38px 48px, #11a36b 48px 58px, #e85b7d 58px 68px, #ca8b4c 68px),
    #a66b3a;
  box-shadow: 0 7px 0 #744523;
}

.shelf-a {
  top: 17%;
  right: 10%;
}

.shelf-b {
  right: 7%;
  bottom: 22%;
  transform: scale(0.82);
}

.scene-vending {
  top: 23%;
  left: 12%;
  width: 48px;
  height: 86px;
  border: 4px solid #b92736;
  background:
    linear-gradient(#ff6b7e 0 18px, #fff7a8 18px 30px, #55d6ff 30px 46px, #ff6b7e 46px),
    #e23b4f;
  box-shadow: 0 7px 0 #8e2130;
}

.scene-sofa {
  left: 10%;
  bottom: 18%;
  width: 128px;
  height: 46px;
  border: 4px solid #6e83aa;
  border-radius: 5px 5px 2px 2px;
  background: #91a9d7;
  box-shadow: 0 8px 0 #556a91;
}

.scene-coffee {
  left: 23%;
  bottom: 19%;
  width: 58px;
  height: 28px;
  border: 4px solid #8c613f;
  background: #d6a064;
  box-shadow: 0 6px 0 #6f492d;
}

.scene-whiteboard {
  top: 15%;
  left: 45%;
  width: 150px;
  height: 62px;
  border: 4px solid #c7d4e5;
  background:
    linear-gradient(12deg, transparent 0 42%, #e85b7d 42% 45%, transparent 45%),
    linear-gradient(-8deg, transparent 0 58%, #2f73ff 58% 61%, transparent 61%),
    #fff;
  box-shadow: 0 7px 0 #94a3b8;
}

.scene-boss-desk {
  top: 17%;
  right: 31%;
  width: 126px;
  height: 58px;
  border: 4px solid #6d4429;
  background: #9d653c;
  box-shadow: 0 9px 0 #5d3822;
}

.scene-trophy {
  top: 11%;
  right: 33%;
  width: 24px;
  height: 36px;
  background: #f2c94c;
  box-shadow:
    -12px 8px 0 #f2c94c,
    12px 8px 0 #f2c94c,
    0 36px 0 #8a5b34;
}

.scene-workstation {
  width: 106px;
  height: 56px;
  border: 4px solid #9aa9bc;
  background:
    linear-gradient(#9be7ff 0 22px, transparent 22px),
    linear-gradient(90deg, #eef2f7 0 48px, transparent 48px 58px, #eef2f7 58px),
    #c9d4e5;
  box-shadow:
    0 8px 0 #7f8fa6,
    42px -22px 0 -12px #344055,
    42px -36px 0 -9px #9be7ff;
}

.station-a {
  left: 41%;
  top: 42%;
}

.station-b {
  left: 54%;
  top: 50%;
}

.station-c {
  left: 35%;
  top: 61%;
}

.scene-meeting-table-prop {
  left: 65%;
  top: 39%;
  width: 118px;
  height: 54px;
  border: 4px solid #8c613f;
  background: #d6a064;
  box-shadow:
    0 8px 0 #6f492d,
    -30px 18px 0 -8px #6e83aa,
    30px 18px 0 -8px #6e83aa,
    58px 2px 0 -8px #6e83aa;
}

.scene-file-cabinet {
  width: 58px;
  height: 54px;
  border: 4px solid #8aa1bf;
  background:
    linear-gradient(#eef5ff 0 16px, #c7d7ee 16px 19px, #eef5ff 19px 35px, #c7d7ee 35px 38px, #eef5ff 38px),
    #eef5ff;
  box-shadow: 0 7px 0 #647995;
}

.cabinet-a {
  left: 74%;
  top: 54%;
}

.cabinet-b {
  left: 22%;
  top: 48%;
}

.scene-display-stand {
  left: 16%;
  top: 62%;
  width: 76px;
  height: 42px;
  border: 4px solid #b98558;
  background:
    radial-gradient(circle at 18px 16px, #2f73ff 0 8px, transparent 9px),
    radial-gradient(circle at 48px 14px, #e85b7d 0 8px, transparent 9px),
    #ffe7a8;
  box-shadow: 0 8px 0 #8c613f;
}

.scene-desk-cluster {
  width: 154px;
  height: 82px;
  border: 4px solid #8aa1bf;
  background:
    linear-gradient(90deg, #eef2f7 0 46px, transparent 46px 54px, #eef2f7 54px 100px, transparent 100px 108px, #eef2f7 108px),
    linear-gradient(#9be7ff 0 22px, transparent 22px),
    #cfd9e8;
  box-shadow:
    0 8px 0 #6d7f98,
    16px -22px 0 -8px #344055,
    16px -34px 0 -6px #9be7ff,
    74px -22px 0 -8px #344055,
    74px -34px 0 -6px #9be7ff,
    128px -22px 0 -8px #344055,
    128px -34px 0 -6px #9be7ff;
}

.cluster-a {
  left: 48%;
  top: 36%;
}

.cluster-b {
  left: 30%;
  top: 70%;
  transform: scale(0.88);
}

.scene-lounge-rug {
  left: 9%;
  top: 66%;
  width: 180px;
  height: 92px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.24) 12px, transparent 12px 24px),
    #d4c5ff;
  box-shadow: 0 5px 0 rgba(80, 62, 140, 0.24);
}

.scene-arcade {
  right: 13%;
  top: 25%;
  width: 48px;
  height: 76px;
  border: 4px solid #734b97;
  background:
    linear-gradient(#8ee8ff 0 28px, #ffd166 28px 42px, #ef476f 42px),
    #734b97;
  box-shadow: 0 8px 0 #4e3268;
}

.scene-water {
  right: 9%;
  top: 45%;
  width: 34px;
  height: 68px;
  border: 4px solid #78a7c8;
  background:
    linear-gradient(#d6f7ff 0 14px, #7dd3fc 14px 42px, #eef7ff 42px),
    #a7e7ff;
  box-shadow: 0 7px 0 #5c7f99;
}

.scene-package {
  width: 54px;
  height: 38px;
  border: 4px solid #a56635;
  background:
    linear-gradient(90deg, transparent 0 22px, #8c4f2a 22px 28px, transparent 28px),
    #d99a55;
  box-shadow: 0 7px 0 #744523;
}

.package-a {
  left: 20%;
  top: 80%;
}

.package-b {
  right: 20%;
  top: 69%;
  transform: scale(0.86);
}

.scene-chair {
  width: 30px;
  height: 28px;
  border: 4px solid #45556f;
  border-radius: 4px 4px 1px 1px;
  background: #5f78a4;
  box-shadow: 0 8px 0 #334056;
}

.chair-a {
  left: 45%;
  top: 51%;
}

.chair-b {
  left: 59%;
  top: 45%;
}

.chair-c {
  left: 28%;
  top: 72%;
}

.chair-d {
  right: 25%;
  top: 51%;
}

.scene-poster {
  width: 42px;
  height: 48px;
  border: 4px solid #c7d4e5;
  background:
    linear-gradient(135deg, #2f73ff 0 34%, #fff 34% 45%, #e85b7d 45% 70%, #ffd166 70%);
  box-shadow: 0 6px 0 #94a3b8;
}

.poster-a {
  left: 24%;
  top: 14%;
}

.poster-b {
  right: 26%;
  top: 17%;
}

.scene-plant {
  width: 22px;
  height: 38px;
  background: #20b26b;
  box-shadow:
    -12px 8px 0 #16a05f,
    12px 8px 0 #35c27d,
    0 34px 0 #9a673f;
}

.plant-a {
  top: 30%;
  left: 8%;
}

.plant-b {
  right: 22%;
  top: 29%;
}

.plant-c {
  right: 176px;
  bottom: 118px;
}

.scene-printer {
  right: 246px;
  bottom: 154px;
  width: 66px;
  height: 36px;
  border: 4px solid #9aa9bc;
  background: #f5f7fb;
  box-shadow: 0 7px 0 #748198;
}

.scene-carpet {
  left: 208px;
  bottom: 96px;
  width: 240px;
  height: 90px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.2) 10px, transparent 10px 20px),
    #ffcad5;
  opacity: 0.72;
}

.pixel-reception {
  position: relative;
  z-index: 5;
  justify-self: center;
  width: fit-content;
  margin: 0 auto;
  min-width: 320px;
  border: 4px solid #1c4da8;
  border-radius: 4px;
  padding: 12px 22px;
  background: #ffffff;
  box-shadow: 0 5px 0 #7fb0ff;
  text-align: center;
}

.pixel-reception span,
.pixel-reception strong {
  display: block;
}

.pixel-reception span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.pixel-reception strong {
  margin-top: 4px;
  font-size: 22px;
}

.pixel-room-grid,
.pixel-meeting-zone {
  position: absolute;
  z-index: 4;
  display: block;
}

.pixel-room-grid {
  inset: 160px 50px 150px;
}

.pixel-meeting-zone {
  right: 7%;
  bottom: 9%;
  width: min(360px, 38%);
}

.pixel-room,
.pixel-meeting-room {
  position: absolute;
  width: min(310px, 32%);
  min-height: 190px;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.pixel-room:hover,
.pixel-meeting-room:hover {
  transform: translateY(-3px);
  box-shadow: none;
}

.pixel-room::before,
.pixel-room::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.pixel-room::before {
  inset: 38px auto auto 12px;
  width: 74%;
  height: 18px;
  background: repeating-linear-gradient(90deg, #fff 0 24px, #dcecff 24px 30px);
  border: 3px solid #d3dfef;
  box-shadow: 0 4px 0 #afc2dc;
}

.pixel-room::after {
  right: 14px;
  top: 54px;
  width: 16px;
  height: 98px;
  background: #ecf4ff;
  border: 3px solid #d3dfef;
  box-shadow: 4px 4px 0 #afc2dc;
}

.pixel-room:nth-child(1) {
  left: 16%;
  top: 34%;
}

.pixel-room:nth-child(2) {
  left: 50%;
  top: 34%;
}

.pixel-room:nth-child(3) {
  right: 8%;
  top: 29%;
}

.pixel-room:nth-child(4) {
  left: 9%;
  top: 58%;
}

.pixel-room:nth-child(5) {
  left: 42%;
  top: 60%;
}

.pixel-room:nth-child(6) {
  right: 5%;
  top: 50%;
}

.room-1,
.room-4 {
  background-color: transparent;
}

.room-2,
.room-5 {
  background-color: transparent;
}

.pixel-meeting-room {
  position: relative;
  width: 100%;
  min-height: 184px;
  background-color: rgba(255, 227, 173, 0.76);
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.25),
    0 0 0 4px rgba(236, 168, 90, 0.45),
    7px 7px 0 rgba(84, 116, 156, 0.16);
}

.pixel-room-title {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 230px;
  border: 3px solid #ffffff;
  border-radius: 4px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 3px 0 rgba(68, 91, 123, 0.16);
}

.pixel-room-title span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 3px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.pixel-room-title strong {
  overflow: hidden;
  color: #172033;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pixel-furniture {
  position: relative;
  z-index: 2;
  height: 76px;
}

.pixel-desk,
.pixel-screen,
.pixel-plant {
  position: absolute;
  display: block;
}

.pixel-desk {
  left: 38px;
  top: 38px;
  width: 96px;
  height: 28px;
  background: #b98558;
  box-shadow: 0 6px 0 #8c613f;
}

.pixel-desk::before,
.pixel-desk::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 54px;
  height: 18px;
  background: #f2f5fb;
  box-shadow: 0 5px 0 #a9b7cc;
}

.pixel-desk::before {
  left: -42px;
}

.pixel-desk::after {
  right: -48px;
}

.pixel-screen {
  left: 78px;
  top: 16px;
  width: 32px;
  height: 24px;
  border: 3px solid #344055;
  background: #9be7ff;
  box-shadow: 0 5px 0 #5c6675;
}

.pixel-plant {
  right: 38px;
  top: 28px;
  width: 18px;
  height: 28px;
  background: #25b36a;
  box-shadow:
    -10px 4px 0 #20a35f,
    10px 4px 0 #34c979,
    0 28px 0 #b77f4c;
}

.pixel-workers,
.pixel-meeting-people {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  min-height: 76px;
  position: relative;
  z-index: 5;
  padding-left: 18px;
}

.pixel-worker-card {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.pixel-worker-card > span {
  max-width: 86px;
  overflow: hidden;
  border: 2px solid #d7e5ff;
  border-radius: 3px;
  padding: 2px 5px;
  background: #fff;
  color: #31405a;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pixel-person {
  position: relative;
  width: 34px;
  height: 54px;
  animation: pixel-idle 1.6s steps(2, end) infinite;
}

.pixel-head,
.pixel-body,
.pixel-legs {
  position: absolute;
  left: 50%;
  display: block;
  transform: translateX(-50%);
}

.pixel-head {
  top: 5px;
  width: 18px;
  height: 18px;
  border: 3px solid #47372e;
  background: var(--skin);
  box-shadow:
    -5px -3px 0 #3d2f28,
    5px -3px 0 #3d2f28;
}

.pixel-head::before,
.pixel-head::after {
  content: "";
  position: absolute;
  display: block;
}

.pixel-head::before {
  left: -4px;
  top: -7px;
  width: 20px;
  height: 8px;
  background: #3d2f28;
}

.pixel-head::after {
  right: -3px;
  top: 7px;
  width: 4px;
  height: 4px;
  background: #2e3448;
}

.avatar-1 .pixel-head::before {
  background: #263247;
  box-shadow: 10px -2px 0 #263247;
}

.avatar-2 .pixel-head::before {
  left: -7px;
  width: 25px;
  background: #7c3aed;
}

.avatar-3 .pixel-head::before {
  top: -9px;
  height: 10px;
  background: #111827;
  box-shadow: 0 6px 0 #111827;
}

.avatar-4 .pixel-head::before {
  left: 1px;
  width: 16px;
  background: #e85b7d;
}

.avatar-5 .pixel-head::before {
  top: -8px;
  background: #f59e0b;
  box-shadow: -5px 7px 0 #f59e0b, 7px 7px 0 #f59e0b;
}

.pixel-body {
  top: 25px;
  width: 22px;
  height: 18px;
  border: 3px solid #263247;
  background: var(--shirt);
}

.pixel-body::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.84);
}

.pixel-legs {
  top: 45px;
  width: 24px;
  height: 7px;
  background: linear-gradient(90deg, #263247 0 9px, transparent 9px 15px, #263247 15px);
}

.pixel-bubble {
  position: absolute;
  top: -18px;
  left: 50%;
  z-index: 2;
  min-width: 44px;
  transform: translateX(-50%);
  border: 2px solid #8ca7cf;
  border-radius: 3px;
  padding: 2px 5px;
  background: #fff;
  color: #38506e;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.pixel-person.working .pixel-bubble {
  color: var(--blue);
}

.pixel-person.meeting {
  animation-name: pixel-meeting;
}

.pixel-person.sleeping {
  animation-name: pixel-sleep;
}

.pixel-person.walking {
  animation-name: pixel-walk;
  animation-duration: 3.2s;
}

.pixel-round-table {
  width: 88px;
  height: 44px;
  margin: 28px auto 0;
  border: 4px solid #8c613f;
  background: #bf8655;
  box-shadow: 0 8px 0 #8b5f3e;
}

.pixel-meeting-people {
  justify-content: center;
  margin-top: -42px;
}

.pixel-meeting-room p,
.pixel-empty-room {
  margin: 12px 0 0;
  border: 2px dashed rgba(49, 64, 90, 0.22);
  border-radius: 4px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.48);
  color: #53677e;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.pixel-empty-room.wide {
  grid-column: 1 / -1;
}

@keyframes pixel-idle {
  50% {
    transform: translateY(-2px);
  }
}

@keyframes pixel-walk {
  50% {
    transform: translate(4px, -1px);
  }
}

@keyframes pixel-sleep {
  50% {
    transform: translateY(2px);
    opacity: 0.72;
  }
}

@keyframes pixel-meeting {
  50% {
    transform: translateY(-3px);
  }
}

.data-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 15px;
  background: #fff;
  box-shadow: var(--shadow);
}

.data-row span {
  min-width: 0;
  overflow: hidden;
  color: #4b5563;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.army-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink);
}

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

.army-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.army-capability-store-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid var(--blue);
  border-radius: 10px;
  padding: 8px 15px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 16px rgb(47 126 247 / 16%);
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.army-capability-store-entry svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
  stroke-width: 1.7;
}

.army-capability-store-entry:hover {
  background: #176de0;
  box-shadow: 0 10px 24px rgb(47 126 247 / 24%);
  transform: translateY(-1px);
}

.army-capability-store-entry:focus-visible {
  outline: 3px solid rgb(47 126 247 / 22%);
  outline-offset: 2px;
}

#armyCount,
.army-section-head > span {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
}

.army-capability-store-entry.active {
  border-color: #cad6e8;
  background: #fff;
  color: #35516f;
  box-shadow: none;
}

.army-capability-store-entry.active:hover {
  border-color: #9eb6d8;
  background: #f7faff;
  color: #1d5fc4;
}

.my-agents-capability-store {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.my-agents-capability-store:focus,
.my-agents-workbench:focus {
  outline: none;
}

.my-agents-capability-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  border: 1px solid #dce6f4;
  border-radius: 14px;
  background: #f7faff;
}

.my-agents-capability-head > div {
  display: grid;
  gap: 6px;
  max-width: 760px;
}

.my-agents-capability-head > div > span {
  color: #2f73ff;
  font-size: 12px;
  font-weight: 800;
}

.my-agents-capability-head h2 {
  margin: 0;
  color: #172033;
  font-size: 21px;
  line-height: 1.35;
}

.my-agents-capability-head p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.my-agents-capability-head .secondary-button {
  flex: 0 0 auto;
}

.army-head h1 {
  margin: 0;
  font-size: 28px;
}

.army-head p,
.army-section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.army-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #f8faff;
}

.army-section + .army-section {
  margin-top: 20px;
}

.army-section-head {
  margin-bottom: 18px;
}

.army-section-head h2 {
  margin: 14px 0 8px;
  font-size: 30px;
}

.army-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.my-agents-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.army-grid.compact {
  grid-template-columns: repeat(5, minmax(126px, 1fr));
  gap: 12px;
}

.my-agents-roster.is-sparse {
  display: grid;
  gap: 16px;
}

.my-agents-roster.is-sparse[data-employee-count="1"] {
  grid-template-columns: minmax(320px, 1.35fr) minmax(260px, 0.65fr);
  align-items: stretch;
}

.army-grid.compact.is-sparse {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
}

.my-agents-roster[data-employee-count="1"] .army-grid.compact.is-sparse {
  grid-template-columns: 1fr;
}

.army-grid.compact.is-sparse .army-card {
  grid-template-columns: 84px minmax(0, 1fr);
  justify-items: stretch;
  align-items: center;
  gap: 16px;
  min-height: 190px;
  padding: 22px 22px 62px;
  text-align: left;
}

.army-grid.compact.is-sparse .army-avatar-button {
  align-self: center;
}

.army-grid.compact.is-sparse .army-card-body {
  min-width: 0;
}

.army-grid.compact.is-sparse .army-card h3 {
  min-height: 0;
  margin-bottom: 7px;
  font-size: 18px;
  -webkit-line-clamp: 1;
}

.army-grid.compact.is-sparse .army-card-actions {
  justify-items: start;
}

.army-grid.compact.is-sparse .army-card p {
  margin: 0;
  font-size: 13px;
  -webkit-line-clamp: 2;
}

.my-agents-team-guide {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  padding: 22px;
  background: linear-gradient(145deg, #f4f8ff, #edf4ff);
  color: var(--ink);
}

.my-agents-team-guide span {
  display: block;
  margin-bottom: 10px;
  color: #2f73ff;
  font-size: 12px;
  font-weight: 900;
}

.my-agents-team-guide strong {
  display: block;
  font-size: 18px;
  line-height: 1.4;
}

.my-agents-team-guide p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.my-agents-team-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.my-agents-team-guide-actions button,
.army-empty-action {
  min-height: 38px;
  border: 1px solid #b8d2ff;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: #245fc8;
  font-weight: 900;
  cursor: pointer;
}

.my-agents-team-guide-actions button:first-child,
.army-empty-action {
  border-color: #2f73ff;
  background: #2f73ff;
  color: #fff;
}

.my-agents-team-guide-actions button:hover,
.army-empty-action:hover {
  transform: translateY(-1px);
}

.army-empty-composed {
  display: flex;
  min-height: 230px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid #cfe0ff;
  padding: 32px;
  background: linear-gradient(145deg, #fff, #f3f7ff);
  text-align: left;
}

.army-empty-copy {
  max-width: 620px;
}

.army-empty-copy span {
  color: #2f73ff;
  font-size: 12px;
  font-weight: 900;
}

.army-empty-copy h2 {
  margin: 8px 0;
  color: var(--ink);
  font-size: 24px;
}

.army-empty-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 1100px) {
  .my-agents-roster.is-sparse[data-employee-count="1"] {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .army-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .army-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .my-agents-capability-head {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
  }

  .my-agents-capability-head .secondary-button {
    align-self: flex-start;
  }

  .army-grid.compact.is-sparse {
    grid-template-columns: 1fr;
  }

  .my-agents-team-guide,
  .army-empty-composed {
    min-height: 0;
    padding: 18px;
  }

  .army-empty-composed {
    align-items: stretch;
    flex-direction: column;
  }
}

.army-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 12px 58px;
  background:
    radial-gradient(circle at 50% 16%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 30%),
    #fff;
  box-shadow: 0 12px 28px rgba(35, 52, 84, 0.08);
  text-align: center;
}

.army-card h3 {
  display: -webkit-box;
  min-height: 40px;
  margin: 0 0 8px;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.army-card-actions {
  display: grid;
  justify-items: center;
  margin-bottom: 9px;
}

.army-card-actions span {
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef2f8;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.army-card p {
  display: -webkit-box;
  margin: 0 auto;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.55;
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.army-avatar-button {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  align-self: start;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #eef4ff;
  box-shadow: none;
  cursor: pointer;
}

.army-avatar-inner.role-avatar-wrap {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 0;
  background: transparent;
}

.army-avatar-inner .role-avatar-img,
.army-avatar-inner .role-avatar-svg {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
}

.army-avatar-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(35, 52, 84, 0.22);
}

.army-avatar-button:focus-visible {
  outline: 2px solid #8ab4ff;
  outline-offset: 2px;
}

.enter-advisor-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #b8d6ff;
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
  color: #2f73ff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(47, 115, 255, 0.12);
  transition:
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.enter-advisor-button span {
  position: relative;
  z-index: 2;
}

.enter-advisor-button::before {
  position: absolute;
  z-index: 1;
  top: -42%;
  bottom: -42%;
  left: -46%;
  width: 168%;
  border-radius: 45% 52% 48% 44%;
  background:
    radial-gradient(circle at 22% 32%, rgba(255, 255, 255, 0.36) 0 5px, transparent 6px),
    radial-gradient(circle at 60% 72%, rgba(255, 255, 255, 0.24) 0 4px, transparent 5px),
    linear-gradient(90deg, #7c3cff, #26c3ff);
  content: "";
  transform: translateX(-76%) rotate(0deg);
  transition: transform 0.62s cubic-bezier(0.2, 0.86, 0.2, 1);
}

.enter-advisor-button::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3cff, #26c3ff);
  content: "";
  opacity: 0;
  transition: opacity 0.22s ease 0.34s;
  pointer-events: none;
}

.all-agent-recent-panel {
  position: sticky;
  top: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.all-agent-recent-panel .panel-title {
  margin-bottom: 10px;
}

.all-agent-recent-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 180px);
  overflow: auto;
}

.all-agent-recent-item {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
  color: #374151;
  text-align: left;
}

.all-agent-recent-item.is-active-conversation {
  border-color: #9dbfff;
  background: #edf4ff;
}

.all-agent-recent-item > .conversation-status-indicator {
  position: absolute;
  top: 8px;
  left: 8px;
}

.all-agent-recent-item:hover {
  border-color: #b9d1ff;
  background: #f7faff;
}

.recent-agent-avatar.role-avatar-wrap {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.recent-agent-avatar .role-avatar-img,
.recent-agent-avatar .role-avatar-svg {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: contain;
}

.all-agent-recent-item strong,
.all-agent-recent-item em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.all-agent-recent-item strong {
  font-size: 13px;
}

.all-agent-recent-item em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.recent-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 26px 12px;
  color: var(--muted);
  text-align: center;
}

.enter-advisor-button:hover {
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 26px rgba(47, 115, 255, 0.24);
  transform: translateY(-1px);
}

.enter-advisor-button:hover::before {
  transform: translateX(16%) rotate(7deg);
}

.enter-advisor-button:hover::after {
  opacity: 1;
}

.army-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 40px;
  color: var(--muted);
  text-align: center;
}

.employee-avatar {
  display: grid;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  place-items: center;
  border: 6px solid #f1f4f9;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.employee-head h3 {
  margin: 0 0 4px;
}

.employee-head span,
.employee-card p {
  color: var(--muted);
  line-height: 1.65;
}

.employee-card button {
  height: 36px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-weight: 800;
}

.chat-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  height: calc(100vh - 88px);
  min-height: 560px;
  overflow: hidden;
}

.app-layout.chat-view-mode .chat-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  height: calc(100vh - 18px);
}

.chat-panel,
.chat-history-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.chat-agent-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e3ecfb;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.92);
}

.chat-title-menu-button {
  display: none;
  flex: 0 0 auto;
  margin-right: 8px;
}

.app-layout.chat-view-mode .chat-title-menu-button {
  display: inline-grid;
}

.chat-agent-bar .secondary-button {
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
}

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

.chat-document-overlay {
  position: fixed;
  inset: 0;
  z-index: 390;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(10px);
}

.chat-document-overlay.hidden {
  display: none;
}

.chat-document-modal {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1040px, 94vw);
  max-height: min(860px, 92vh);
  overflow: hidden;
  border: 1px solid #cfe0fb;
  border-radius: 10px;
  background: #f7faff;
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.3);
}

.chat-document-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid #dbe7f7;
  background: #fff;
}

.chat-document-head > div > span,
.document-report-head > span,
.document-summary > span {
  color: #2f73ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.chat-document-head h2 {
  margin: 5px 0 7px;
  color: #17233a;
  font-size: 24px;
}

.chat-document-head p {
  max-width: 680px;
  margin: 0;
  color: #71809a;
  font-size: 13px;
  line-height: 1.6;
}

.chat-document-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid #d8e4f6;
  border-radius: 6px;
  background: #f5f8fe;
  color: #566985;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.chat-document-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 14px;
  padding: 16px 26px;
  border-bottom: 1px solid #dbe7f7;
  background: #fbfdff;
}

.chat-document-editor label {
  display: grid;
  gap: 7px;
  color: #52647f;
  font-size: 12px;
  font-weight: 800;
}

.chat-document-editor input,
.chat-document-editor textarea {
  width: 100%;
  border: 1px solid #cfdef3;
  border-radius: 6px;
  padding: 9px 11px;
  outline: none;
  background: #fff;
  color: #1a2944;
  font: inherit;
  font-weight: 500;
  resize: vertical;
}

.chat-document-editor input:focus,
.chat-document-editor textarea:focus {
  border-color: #2f73ff;
  box-shadow: 0 0 0 3px rgba(47, 115, 255, 0.1);
}

.chat-document-selector {
  border-bottom: 1px solid #dbe7f7;
  background: #fff;
}

.chat-document-selector summary,
.chat-document-selector-controls,
.chat-document-selector-actions {
  display: flex;
  align-items: center;
}

.chat-document-selector summary {
  justify-content: space-between;
  gap: 16px;
  padding: 13px 26px;
  cursor: pointer;
  list-style: none;
}

.chat-document-selector summary::-webkit-details-marker {
  display: none;
}

.chat-document-selector summary > span {
  display: grid;
  gap: 2px;
}

.chat-document-selector summary strong {
  color: #263a58;
  font-size: 13px;
}

.chat-document-selector summary em {
  color: #7a8aa1;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

.chat-document-selector summary b {
  border-radius: 999px;
  padding: 5px 9px;
  background: #edf4ff;
  color: #2f73ff;
  font-size: 12px;
}

.chat-document-selector-controls {
  gap: 10px;
  padding: 0 26px 10px;
}

.chat-document-selector-controls input {
  min-width: 0;
  flex: 1;
  border: 1px solid #d6e3f4;
  border-radius: 6px;
  padding: 8px 10px;
  outline: none;
  color: #263a58;
  font: inherit;
  font-size: 12px;
}

.chat-document-selector-controls input:focus {
  border-color: #2f73ff;
  box-shadow: 0 0 0 3px rgba(47, 115, 255, 0.1);
}

.chat-document-selector-actions {
  gap: 8px;
}

.chat-document-selector-actions button {
  border: 0;
  padding: 4px 7px;
  background: transparent;
  color: #2f73ff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.chat-document-message-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 236px;
  overflow: auto;
  padding: 0 26px 14px;
}

.chat-document-message-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #dbe6f5;
  border-radius: 6px;
  background: #fbfdff;
  cursor: pointer;
}

.chat-document-message-option input {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: #2f73ff;
}

.chat-document-message-option span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  min-width: 0;
}

.chat-document-message-option strong {
  overflow: hidden;
  color: #314764;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-document-message-option em {
  color: #8290a5;
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.chat-document-message-option small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #71809a;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-document-preview-wrap {
  overflow: auto;
  padding: 24px;
  background: #edf3fb;
}

.chat-document-preview {
  width: min(760px, 100%);
  min-height: 680px;
  margin: 0 auto;
  padding: 48px 52px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(36, 60, 96, 0.13);
}

.document-report-head {
  padding-bottom: 22px;
  border-bottom: 2px solid #2f73ff;
}

.document-report-head h1 {
  margin: 7px 0 17px;
  color: #14233e;
  font-size: 28px;
  line-height: 1.25;
}

.document-report-head dl {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
}

.document-report-head dl div {
  min-width: 132px;
}

.document-report-head dt {
  color: #77869b;
  font-size: 11px;
}

.document-report-head dd {
  margin: 2px 0 0;
  color: #283a57;
  font-size: 13px;
  font-weight: 800;
}

.document-summary {
  margin: 22px 0;
  padding: 14px 16px;
  border: 1px solid #d6e6ff;
  border-radius: 6px;
  background: #f4f8ff;
}

.document-summary p {
  margin: 7px 0 0;
  color: #405571;
  font-size: 13px;
  line-height: 1.75;
}

.document-conversation h2 {
  margin: 28px 0 14px;
  color: #1a2b48;
  font-size: 19px;
}

.document-message {
  margin: 14px 0;
  border: 1px solid #dde7f4;
  border-left: 4px solid #2f73ff;
  border-radius: 6px;
  padding: 14px 16px;
}

.document-message.agent {
  border-left-color: #18a972;
}

.document-message > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #76869c;
  font-size: 11px;
}

.document-message > header strong {
  color: #1c2d48;
  font-size: 12px;
}

.document-message-content > :first-child {
  margin-top: 10px;
}

.document-message-content p,
.document-message-content li {
  color: #354965;
  font-size: 13px;
  line-height: 1.78;
}

.document-message-content table {
  width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
}

.document-message-content th,
.document-message-content td {
  border: 1px solid #d4e0ef;
  padding: 7px 8px;
  color: #354965;
  font-size: 12px;
  text-align: left;
  vertical-align: top;
}

.document-message-content th {
  background: #edf5ff;
}

.document-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.document-image-grid figure {
  margin: 0;
}

.document-image-grid img {
  display: block;
  width: 100%;
  max-height: 260px;
  border: 1px solid #d8e4f5;
  border-radius: 5px;
  object-fit: contain;
}

.document-image-error {
  margin-top: 12px;
  border: 1px solid #f4b8be;
  border-radius: 6px;
  padding: 12px 14px;
  color: #a43342;
  background: #fff5f6;
  font-size: 12px;
  line-height: 1.6;
}

.document-file-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #596d88;
  font-size: 12px;
}

.document-report-foot {
  margin-top: 28px;
  padding-top: 12px;
  border-top: 1px solid #e0e8f3;
  color: #7a899d;
  font-size: 11px;
}

.document-empty {
  color: #7c8ba0;
}

.chat-document-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 26px;
  border-top: 1px solid #dbe7f7;
  background: #fff;
}

.chat-history-backdrop {
  position: absolute;
  inset: 0;
  z-index: 34;
  display: none;
  border: 0;
  padding: 0;
  background: rgba(27, 39, 63, 0.18);
  cursor: pointer;
}

.chat-layout.history-open .chat-history-backdrop {
  display: block;
}

.chat-history-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  width: min(320px, calc(100% - 48px));
  overflow: auto;
  opacity: 0;
  transform: translateX(calc(100% + 20px));
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.22s ease;
}

.chat-layout.history-open .chat-history-panel {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.chat-agent-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  border: 0;
  border-radius: 7px;
  padding: 7px 10px;
  background: transparent;
  color: #172033;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
}

.chat-agent-arrow {
  display: block;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  object-fit: contain;
  opacity: 0.9;
}

.chat-agent-toggle:hover {
  background: #eef4ff;
}

.chat-agent-popover {
  position: absolute;
  left: 14px;
  top: calc(100% + 8px);
  z-index: 9;
  width: min(420px, calc(100% - 28px));
  border: 1px solid #d8e6ff;
  border-radius: 18px;
  padding: 24px 24px 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 46px rgba(37, 71, 123, 0.16);
}

.chat-agent-popover.hidden {
  display: none;
}

.chat-agent-profile-head {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.chat-agent-profile-head .employee-avatar {
  width: 72px;
  height: 72px;
  margin: 0;
}

.chat-agent-profile-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 850;
  line-height: 1.25;
}

.chat-agent-profile-head p {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
}

.chat-agent-profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
  text-align: center;
}

.chat-agent-profile-stats span {
  display: grid;
  gap: 5px;
}

.chat-agent-profile-stats strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-agent-profile-stats em {
  color: #98a2b3;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

.chat-agent-profile-section {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.chat-agent-profile-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.chat-agent-starter-preview {
  width: fit-content;
  max-width: 100%;
  border: 1px solid #dfe7f5;
  border-radius: 12px;
  padding: 11px 16px;
  background: #fff;
  color: #374151;
  box-shadow: 0 8px 18px rgba(37, 71, 123, 0.07);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
}

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

.chat-agent-capability-list li {
  position: relative;
  padding-left: 22px;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.chat-agent-capability-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  color: #16a34a;
  font-size: 15px;
  font-weight: 700;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.chat-messages {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  padding: 18px 18px 18px 24px;
  overflow: auto;
}

.chat-quick-rail {
  position: sticky;
  left: 24px;
  top: 46%;
  z-index: 1;
  display: grid;
  width: 10px;
  gap: 1px;
  align-self: start;
  justify-self: start;
  height: 0;
  margin: 0 0 -10px;
  padding: 2px 0;
  transform: translate(-44px, -50%);
  pointer-events: auto;
}

.group-chat-panel .chat-quick-rail {
  transform: translate(-44px, -50%);
}

.chat-quick-rail:hover {
  z-index: 20;
}

.chat-quick-rail button {
  position: relative;
  z-index: 1;
  display: grid;
  width: 10px;
  height: 8px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #94a3b8;
  box-shadow: none;
}

.chat-quick-rail button:hover {
  color: #4b5563;
}

.chat-quick-rail button span {
  display: block;
  width: 6px;
  height: 2px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.58);
  transition:
    width 0.16s ease,
    background 0.16s ease;
}

.chat-quick-rail button:hover span {
  width: 10px;
  background: #4b5563;
}

.chat-quick-rail button.active span {
  width: 10px;
  background: #374151;
}

.chat-quick-rail button:hover::after {
  content: attr(data-snapshot);
  position: absolute;
  left: 18px;
  top: -8px;
  width: 260px;
  max-width: min(260px, calc(100vw - 120px));
  transform: translateY(-100%);
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.98);
  color: #1f2937;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  text-align: left;
  white-space: pre-line;
  box-shadow: 0 14px 36px rgba(31, 43, 63, 0.16);
}

.message {
  max-width: 86%;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.7;
}

.chat-message-row {
  display: grid;
  align-items: start;
  gap: 8px;
  min-width: 0;
  max-width: 92%;
}

.chat-message-row.agent {
  grid-template-columns: 36px minmax(0, 1fr);
  justify-self: start;
}

.chat-message-row.user {
  grid-template-columns: minmax(0, 1fr) 36px;
  justify-self: end;
  margin-right: 0;
}

.chat-message-row.user .message {
  transform: translateX(15px);
}

.chat-message-row.user .message > span,
.group-message.user > span {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-message-row.agent .message > span,
.group-message.agent > span {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.chat-message-row .message,
.chat-message-row .message-stack {
  max-width: none;
}

.chat-message-avatar,
.chat-message-avatar.role-avatar-wrap {
  position: relative;
  z-index: 3;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #eaf2ff;
  color: #2f73ff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(37, 71, 123, 0.12);
}

.chat-message-avatar .role-avatar-img,
.chat-message-avatar .role-avatar-svg {
  width: 92%;
  height: 92%;
  margin: 0;
  object-fit: contain;
}

.chat-message-avatar.user img,
.group-chat-avatar.user img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.chat-message-avatar.user {
  background: #2f73ff;
  color: #fff;
}

.message.agent {
  justify-self: start;
  border: 1px solid rgba(206, 219, 240, 0.78);
  background: linear-gradient(135deg, #f8fbff, #eef5ff);
  box-shadow: 0 12px 28px rgba(35, 52, 84, 0.08);
}

.message.agent.thinking {
  position: relative;
  overflow: hidden;
  border-color: rgba(47, 115, 255, 0.32);
  background:
    radial-gradient(circle at 18% 18%, rgba(47, 115, 255, 0.12), transparent 26%),
    linear-gradient(135deg, #f8fbff, #edf5ff);
  animation: thinkingPulse 1.8s ease-in-out infinite;
}

.message.agent.thinking::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  animation: thinkingShimmer 2.4s ease-in-out infinite;
  pointer-events: none;
}

.message.agent.thinking::after {
  content: none;
}

.message.agent.thinking > * {
  position: relative;
  z-index: 1;
}

.message.agent.thinking .rich-ai-reply h3 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}

.message.agent.thinking .rich-ai-reply h3::after {
  content: "";
  flex: 0 0 auto;
  width: 20px;
  height: 6px;
  border-radius: 999px;
  background:
    radial-gradient(circle, #2f73ff 46%, transparent 52%) 0 50% / 6px 6px no-repeat,
    radial-gradient(circle, #2f73ff 46%, transparent 52%) 7px 50% / 6px 6px no-repeat,
    radial-gradient(circle, #2f73ff 46%, transparent 52%) 14px 50% / 6px 6px no-repeat;
  opacity: 0.8;
  animation: thinkingDots 1.15s steps(3, end) infinite;
}

.message.agent.thinking.media-thinking {
  width: min(380px, 76vw);
  min-height: 236px;
  padding: 18px;
  border-color: rgba(47, 115, 255, 0.42);
  background:
    linear-gradient(135deg, rgba(248, 251, 255, 0.94), rgba(235, 244, 255, 0.9)),
    #edf5ff;
  box-shadow: 0 18px 42px rgba(47, 115, 255, 0.14);
}

.message.agent.thinking.media-thinking::before {
  content: "";
  position: absolute;
  inset: 16px 16px 62px;
  border-radius: 14px;
  transform: none;
  pointer-events: none;
}

.message.agent.thinking.image-thinking::before {
  inset: 16px 16px 76px;
  background:
    linear-gradient(122deg, rgba(213, 233, 255, 0.96) 4%, rgba(237, 246, 255, 0.9) 34%, rgba(218, 244, 246, 0.92) 62%, rgba(235, 223, 255, 0.86) 100%),
    linear-gradient(90deg, transparent 0 32%, rgba(255, 255, 255, 0.52) 32% 33%, transparent 33% 66%, rgba(255, 255, 255, 0.42) 66% 67%, transparent 67%);
  background-size: 190% 190%, 100% 100%;
  background-position: 0% 50%, center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82), 0 14px 32px rgba(85, 142, 235, 0.1);
  animation: imageCanvasFlow 2.1s ease-in-out infinite alternate, imageCanvasBreathe 1.5s ease-in-out infinite;
}

.message.agent.thinking.video-thinking::before {
  inset: 22px 16px 72px;
  border-radius: 12px;
  background:
    linear-gradient(132deg, rgba(205, 232, 255, 0.98) 0%, rgba(231, 240, 255, 0.94) 40%, rgba(220, 232, 255, 0.94) 65%, rgba(237, 222, 255, 0.9) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), transparent 22% 78%, rgba(255, 255, 255, 0.28));
  background-size: 180% 180%, 100% 100%;
  background-position: 12% 50%, center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82), 0 14px 32px rgba(83, 106, 225, 0.12);
  animation: videoCanvasFlow 2.35s ease-in-out infinite alternate, imageCanvasBreathe 1.7s ease-in-out infinite;
}

.message.agent.thinking.music-thinking::before {
  inset: 18px 16px 74px;
  border-radius: 16px;
  background:
    linear-gradient(118deg, rgba(218, 245, 255, 0.96), rgba(224, 233, 255, 0.94) 38%, rgba(237, 222, 255, 0.94) 68%, rgba(211, 250, 241, 0.92)),
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(255, 255, 255, 0.48) 14px 19px);
  background-size: 190% 190%, 100% 100%;
  background-position: 0% 50%, center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.86), 0 14px 32px rgba(102, 91, 220, 0.13);
  animation: musicCanvasFlow 2.2s ease-in-out infinite alternate, imageCanvasBreathe 1.65s ease-in-out infinite;
}

.message.agent.thinking.video-thinking::after {
  content: none;
}

.message.agent.thinking.video-thinking > span::before {
  content: none;
}

.message.agent.thinking > .media-generation-status {
  position: absolute;
  top: calc(50% - 45px);
  left: 50%;
  z-index: 2;
  display: grid;
  min-width: 70px;
  justify-items: center;
  gap: 4px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #2f73ff;
  transform: translateX(-50%);
  pointer-events: none;
}

.message.agent.thinking > .media-generation-status.has-video-placeholder {
  inset: 16px 16px 76px;
  top: 16px;
  left: 16px;
  display: grid;
  width: auto;
  min-width: 0;
  overflow: hidden;
  place-content: center;
  border-radius: 14px;
  padding: 0;
  background: transparent;
  transform: none;
}

.media-generation-placeholder-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: transparent;
  object-fit: cover;
  opacity: 0;
  transition: opacity 180ms ease-out;
}

.media-generation-placeholder-video.is-ready {
  opacity: 1;
}

.media-generation-status.has-video-placeholder > .chat-mode-icon,
.media-generation-status.has-video-placeholder > strong,
.media-generation-status.has-video-placeholder > small {
  position: relative;
  z-index: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 6px 18px rgba(35, 52, 84, 0.12);
  backdrop-filter: blur(8px);
}

.media-generation-status.has-video-placeholder > .chat-mode-icon {
  display: none;
}

.media-generation-status.has-video-placeholder > strong {
  min-width: 52px;
  padding: 7px 10px 3px;
  text-align: center;
}

.media-generation-status.has-video-placeholder > small {
  min-width: 52px;
  padding: 2px 10px 7px;
  text-align: center;
}

.media-generation-status.has-video-placeholder.placeholder-video-failed > .chat-mode-icon {
  display: block;
}

.message.agent.thinking > .video-generation-status:not(.has-video-placeholder) {
  top: calc(50% - 40px);
}

.message.agent.thinking > .music-generation-status:not(.has-video-placeholder) {
  top: calc(50% - 40px);
  color: #6754d9;
}

.message.agent.thinking .media-generation-status .chat-mode-icon {
  width: 22px;
  height: 22px;
  border-width: 1.7px;
  flex-basis: 22px;
}

.media-generation-status .chat-mode-icon-image::before {
  top: 4px;
  left: 4px;
  width: 4px;
  height: 4px;
  border-width: 1.5px;
}

.media-generation-status .chat-mode-icon-image::after {
  left: 3px;
  right: 3px;
  bottom: 3px;
  height: 8px;
  border-top-width: 1.7px;
}

.media-generation-status .chat-mode-icon-video::after {
  top: 6px;
  left: 8px;
  border-top-width: 4px;
  border-bottom-width: 4px;
  border-left-width: 7px;
}

.media-generation-status .chat-mode-icon-music::before {
  top: 4px;
  left: 10px;
  width: 7px;
  height: 10px;
  border-top-width: 1.8px;
  border-left-width: 1.8px;
}

.media-generation-status .chat-mode-icon-music::after {
  left: 4px;
  bottom: 4px;
  width: 7px;
  height: 5px;
  box-shadow: 7px -3px 0 -0.4px currentColor;
}

.message.agent.thinking > .music-generation-status strong {
  color: #5848cf;
}

.media-generation-status strong {
  color: #1d5fde;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.media-generation-status small {
  color: #60728f;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.message.agent.thinking.media-thinking > span {
  display: flex;
  min-height: 200px;
  align-items: end;
}

.message.agent.thinking.media-thinking .rich-ai-reply {
  display: flex;
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.message.agent.thinking.media-thinking .rich-ai-reply > :not(h3) {
  display: none;
}

.message.agent.thinking.media-thinking .rich-ai-reply h3 {
  width: fit-content;
  max-width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 24px rgba(35, 52, 84, 0.1);
  backdrop-filter: blur(8px);
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 多图任务必须边生成边交付。已完成图片进入消息后，退出整卡占位布局，
   保留紧凑进度提示并立即显示现有结果；剩余子任务继续在后台运行。 */
.message.agent.thinking.image-thinking.has-partial-image-results {
  width: fit-content;
  max-width: min(760px, 100%);
  min-height: 0;
  overflow: visible;
  padding: 12px;
}

.message.agent.thinking.image-thinking.has-partial-image-results::before {
  display: none;
}

.message.agent.thinking.image-thinking.has-partial-image-results > span {
  display: block;
  min-height: 0;
}

.message.agent.thinking.image-thinking.has-partial-image-results .rich-ai-reply {
  display: grid;
  justify-content: stretch;
}

.message.agent.thinking.image-thinking.has-partial-image-results .rich-ai-reply > :not(h3) {
  display: block;
}

.message.agent.thinking.image-thinking.has-partial-image-results .rich-ai-reply h3 {
  justify-self: start;
}

.message.agent.thinking.image-thinking.has-partial-image-results > .media-generation-status.has-video-placeholder {
  position: static;
  display: flex;
  width: fit-content;
  min-width: 0;
  margin-top: 10px;
  overflow: visible;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 7px 10px;
  background: #eef5ff;
  color: #1d5fde;
  transform: none;
}

.message.agent.thinking.image-thinking.has-partial-image-results .media-generation-placeholder-video,
.message.agent.thinking.image-thinking.has-partial-image-results > .media-generation-status .chat-mode-icon {
  display: none;
}

.message.agent.thinking.image-thinking.has-partial-image-results > .media-generation-status strong,
.message.agent.thinking.image-thinking.has-partial-image-results > .media-generation-status small {
  min-width: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .message.agent.thinking.image-thinking::before,
  .message.agent.thinking.video-thinking::before,
  .message.agent.thinking.music-thinking::before {
    animation: none;
  }

  .media-generation-placeholder-video {
    transition: none;
  }
}

.message-stack {
  display: grid;
  gap: 5px;
  max-width: 86%;
}

.message-stack.agent {
  justify-self: start;
  min-width: 0;
  max-width: min(86%, calc(100% - 48px));
}

.message-stack .message {
  min-width: 0;
  max-width: none;
  overflow: hidden;
}

.chat-web-search-source {
  position: relative;
  z-index: 8;
  display: inline-flex;
  width: fit-content;
  align-items: center;
}

.chat-web-search-source-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #cfe0ff;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #2f73ff;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 6px 16px rgba(35, 52, 84, 0.1);
}

.chat-web-search-source.is-failed .chat-web-search-source-icon {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.chat-web-search-source-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 40;
  display: none;
  width: min(360px, calc(100vw - 88px));
  max-height: 260px;
  overflow: auto;
  box-sizing: border-box;
  gap: 8px;
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
  color: #25324a;
  box-shadow: 0 18px 42px rgba(31, 43, 63, 0.18);
  font-size: 12px;
  line-height: 1.5;
}

.chat-web-search-source:hover .chat-web-search-source-tooltip,
.chat-web-search-source:focus-within .chat-web-search-source-tooltip {
  display: grid;
}

.chat-web-search-source-tooltip > b,
.chat-web-search-source-tooltip > em {
  overflow-wrap: anywhere;
  font-style: normal;
}

.chat-web-search-source-tooltip > a {
  display: grid;
  min-width: 0;
  gap: 2px;
  border-top: 1px solid #edf3ff;
  padding-top: 7px;
  color: #315b9e;
  text-decoration: none;
}

.chat-web-search-source-tooltip > a:hover {
  color: #175cd3;
}

.chat-web-search-source-tooltip > a span {
  overflow-wrap: anywhere;
}

@keyframes thinkingPulse {
  0%,
  100% {
    box-shadow: 0 12px 28px rgba(35, 52, 84, 0.08), 0 0 0 rgba(47, 115, 255, 0);
  }
  50% {
    box-shadow: 0 16px 34px rgba(35, 52, 84, 0.12), 0 0 0 4px rgba(47, 115, 255, 0.08);
  }
}

@keyframes thinkingShimmer {
  0% {
    transform: translateX(-120%);
  }
  55%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes thinkingDots {
  0% {
    clip-path: inset(0 18px 0 0);
  }
  33% {
    clip-path: inset(0 9px 0 0);
  }
  66%,
  100% {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes imageGeneratingSweep {
  0% {
    background-position: -190px 0, center, center, center, center;
  }
  100% {
    background-position: calc(100% + 190px) 0, center, center, center, center;
  }
}

@keyframes imageGeneratingGlow {
  0%,
  100% {
    filter: saturate(1) brightness(1);
    transform: scale(1);
  }
  50% {
    filter: saturate(1.15) brightness(1.04);
    transform: scale(1.012);
  }
}

@keyframes imageCanvasFlow {
  0% { background-position: 0% 50%, center; }
  100% { background-position: 100% 54%, center; }
}

@keyframes videoCanvasFlow {
  0% { background-position: 0% 42%, center; }
  100% { background-position: 100% 60%, center; }
}

@keyframes musicCanvasFlow {
  0% { background-position: 0% 46%, center; filter: hue-rotate(0deg); }
  100% { background-position: 100% 56%, center; filter: hue-rotate(10deg); }
}

@keyframes imageCanvasBreathe {
  0%, 100% { filter: saturate(0.98) brightness(0.99); transform: scale(1); }
  50% { filter: saturate(1.18) brightness(1.05); transform: scale(1.018); }
}

@keyframes videoPlayPulse {
  0%, 100% { transform: scale(0.94); opacity: 0.7; }
  50% { transform: scale(1.06); opacity: 1; }
}

.message.system {
  justify-self: center;
  max-width: 88%;
  background: #eef4ff;
  color: #375078;
}

.message.user {
  justify-self: end;
  margin-right: 16px;
  background: var(--blue);
  color: #fff;
}

.message strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  opacity: 0.78;
}

.message span {
  display: block;
}

.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  max-width: min(360px, 100%);
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 6px 8px 6px 6px;
  background: #f8fbff;
  color: #243047;
  box-shadow: 0 8px 20px rgba(37, 71, 123, 0.06);
}

.attachment-chip-preview,
.message-file-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #eaf2ff;
  color: #2f73ff;
  font-size: 10px;
  font-weight: 1000;
}

.message .message-file-icon {
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1;
}

.attachment-chip-preview.image-preview {
  overflow: hidden;
  background: #fff;
}

.attachment-chip-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-chip-text {
  display: grid;
  min-width: 0;
  margin: 0 8px;
}

.attachment-chip-text strong,
.message-file-attachment strong,
.message-image-attachment figcaption strong {
  overflow: hidden;
  max-width: 220px;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip-text em,
.message-file-attachment em,
.message-image-attachment figcaption em {
  color: inherit;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  opacity: 0.68;
}

.attachment-chip button {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: #eaf2ff;
  color: #4f6077;
  font-weight: 1000;
}

.attachment-chip.image-only {
  width: 104px;
  height: 74px;
  max-width: none;
  overflow: visible;
  border-radius: 8px;
  padding: 4px;
  background: #fff;
}

.attachment-chip.image-only .attachment-chip-preview {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #f5f8fd;
  cursor: pointer;
}

.attachment-chip.image-only .attachment-chip-preview img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
}

.attachment-chip-pdf .attachment-chip-preview,
.message-file-attachment.file-kind-pdf .message-file-icon {
  background: #fff0f0;
  color: #d92d20;
}

.attachment-chip-document .attachment-chip-preview,
.message-file-attachment.file-kind-document .message-file-icon {
  background: #edf5ff;
  color: #2563eb;
}

.attachment-chip-spreadsheet .attachment-chip-preview,
.message-file-attachment.file-kind-spreadsheet .message-file-icon {
  background: #eafff5;
  color: #079455;
}

.attachment-chip-presentation .attachment-chip-preview,
.message-file-attachment.file-kind-presentation .message-file-icon {
  background: #fff7e8;
  color: #dc6803;
}

.attachment-chip-archive .attachment-chip-preview,
.message-file-attachment.file-kind-archive .message-file-icon {
  background: #f4efff;
  color: #7047d9;
}

.message-image-attachment {
  overflow: hidden;
  width: min(220px, 100%);
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.message-image-attachment img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.2);
}

.message-image-open {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.message-image-actions {
  display: flex;
  gap: 6px;
  padding: 7px 8px;
}

.message-image-actions button {
  border: 0;
  border-radius: 5px;
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.message.agent .message-image-actions button {
  background: #eaf2ff;
  color: #2767dc;
}

.message-image-attachment figcaption,
.message-file-attachment {
  padding: 7px 9px;
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0.9;
}

.message-file-attachment {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: min(260px, 100%);
  max-width: min(360px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.message-file-attachment span:last-child,
.message-image-attachment figcaption {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.message.agent .message-image-attachment,
.message.agent .message-file-attachment {
  border-color: #d8e6ff;
  background: #f7fbff;
}

.rich-ai-reply {
  display: grid;
  gap: 12px;
  min-width: 0;
  color: #111827;
  line-height: 1.82;
}

.rich-ai-reply h3 {
  margin: 12px 0 0;
  color: #111827;
  font-size: 15px;
  font-weight: 1000;
  line-height: 1.5;
}

.rich-ai-reply h3:first-child {
  margin-top: 0;
}

.rich-ai-reply p {
  margin: 0;
  color: #1f2937;
}

.rich-ai-reply ul,
.rich-ai-reply ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 22px;
}

.rich-ai-reply li {
  padding-left: 4px;
  color: #1f2937;
}

.rich-ai-reply li::marker {
  color: #111827;
  font-weight: 1000;
}

.rich-ai-reply blockquote {
  display: grid;
  gap: 6px;
  margin: 0;
  border-left: 3px solid #94a3b8;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.62);
  color: #374151;
}

.rich-ai-reply hr {
  width: 100%;
  height: 1px;
  margin: 2px 0;
  border: 0;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.34), rgba(148, 163, 184, 0.04));
}

.generated-image-card {
  position: relative;
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.12);
}

.generated-image-open {
  display: block;
  max-width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.generated-image-card img {
  display: block;
  width: auto;
  max-width: min(720px, 100%);
  max-height: calc(100vh - 260px);
  height: auto;
  object-fit: contain;
  background: #f8fbff;
}

.generated-image-card img[data-chat-media-url] {
  width: min(720px, 76vw);
  aspect-ratio: 16 / 9;
  opacity: 0;
  background: linear-gradient(110deg, #eef5ff 8%, #f8fbff 28%, #e8f1ff 46%, #f8fbff 66%, #eef5ff 86%);
  background-size: 220% 100%;
  animation: chat-media-skeleton 1.35s linear infinite;
  transition: opacity 0.24s ease;
}

.generated-image-card img[data-chat-media-url].chat-media-loaded[src] {
  width: auto;
  aspect-ratio: auto;
  opacity: 1;
  animation: none;
}

.generated-image-card img.chat-media-error {
  min-height: 120px;
  opacity: 0;
  animation: none;
  background: #fff7f7;
}

.generated-image-loading-state {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0) 34%),
    linear-gradient(135deg, #eef7ff 0%, #f8fbff 48%, #eef2ff 100%);
  color: #17345f;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.generated-image-loading-state::before {
  position: absolute;
  inset: -45% -30%;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, 0.72) 49%, transparent 60%);
  content: "";
  transform: translateX(-38%);
  animation: generated-image-loading-sheen 1.8s ease-in-out infinite;
}

.generated-image-loading-state > * {
  position: relative;
  z-index: 1;
}

.generated-image-loading-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  margin-bottom: 3px;
  border: 1px solid rgba(47, 115, 255, 0.3);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 8px 22px rgba(47, 115, 255, 0.12);
}

.generated-image-loading-mark i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2f73ff;
  animation: generated-image-loading-dot 1.1s ease-in-out infinite;
}

.generated-image-loading-mark i:nth-child(2) {
  animation-delay: 0.14s;
}

.generated-image-loading-mark i:nth-child(3) {
  animation-delay: 0.28s;
}

.generated-image-loading-state strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.generated-image-loading-state small {
  color: #7184a1;
  font-size: 12px;
  line-height: 1.4;
}

.generated-image-card.chat-media-ready .generated-image-loading-state {
  visibility: hidden;
  opacity: 0;
}

.generated-image-card.chat-media-failed .generated-image-loading-state {
  background: linear-gradient(135deg, #fff7f7 0%, #fffafa 100%);
  color: #9f3040;
}

.generated-image-card.chat-media-failed .generated-image-loading-state::before,
.generated-image-card.chat-media-failed .generated-image-loading-mark i {
  animation: none;
}

.generated-image-card.chat-media-failed .generated-image-loading-mark {
  border-color: rgba(208, 73, 93, 0.24);
}

.generated-image-card.chat-media-failed .generated-image-loading-mark i {
  background: #d0495d;
}

@keyframes generated-image-loading-sheen {
  0%, 18% { transform: translateX(-38%); opacity: 0; }
  40% { opacity: 1; }
  72%, 100% { transform: translateX(38%); opacity: 0; }
}

@keyframes generated-image-loading-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.42; }
  30% { transform: translateY(-3px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .generated-image-card img[data-chat-media-url],
  .generated-image-loading-state::before,
  .generated-image-loading-mark i {
    animation: none;
  }
}

.message.agent.has-chat-image-actions {
  position: relative;
}

.chat-image-actions {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 1px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.chat-image-action {
  display: grid;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 3px;
  background: transparent;
  color: #1749ad;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.chat-image-action svg {
  width: 25px;
  height: 25px;
  overflow: visible;
  border: 1px solid rgba(47, 115, 255, 0.32);
  border-radius: 50%;
  padding: 4px;
  background: radial-gradient(circle at 34% 25%, #ffffff 0 18%, #eaf3ff 48%, #d9e6ff 100%);
  box-shadow: inset 0 1px 0 #ffffff, 0 3px 8px rgba(47, 115, 255, 0.2);
  fill: none;
  stroke: #1f5fd1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  pointer-events: none;
  transition: transform 0.16s ease;
}

.chat-image-action:hover svg,
.chat-image-action:focus-visible svg {
  transform: translateY(-1px);
}

.chat-image-action:active svg {
  transform: scale(0.96);
}

.chat-image-action:focus-visible {
  outline: 2px solid #2f73ff;
  outline-offset: 1px;
}

.chat-image-action:disabled {
  cursor: wait;
  opacity: 0.5;
}

.message.agent:hover > .chat-image-actions,
.message.agent:focus-within > .chat-image-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.message.agent.has-chat-image-actions > span > .rich-ai-reply > :first-child {
  min-height: 40px;
  padding-right: 106px;
}

.message.agent.has-chat-image-actions > .chat-image-actions.mode-failure + span > .rich-ai-reply > :first-child {
  padding-right: 44px;
}

@media (hover: none) {
  .chat-image-actions {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

@media (any-pointer: coarse) {
  .chat-image-actions {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-image-actions,
  .chat-image-action svg {
    transition: none;
  }
}

@keyframes chat-media-skeleton {
  to { background-position-x: -220%; }
}

.message.agent:has(.generated-image-card) {
  width: fit-content;
  max-width: min(760px, 100%);
  padding: 12px;
}

.message.agent:has(.generated-image-card) > span,
.message.agent:has(.generated-image-card) .rich-ai-reply {
  width: fit-content;
  max-width: 100%;
}

.generated-video-card {
  display: grid;
  gap: 10px;
  overflow: hidden;
  width: min(760px, 100%);
  margin: 0;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.12);
}

.generated-video-card video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 280px);
  border-radius: 6px;
  background: #0f172a;
}

.generated-video-card a {
  color: #2563eb;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.generated-video-card a:hover {
  text-decoration: underline;
}

.message.agent:has(.generated-video-card) {
  width: min(800px, 100%);
}

.domestic-content-video-card {
  display: grid;
  gap: 12px;
  width: min(720px, 100%);
  margin: 16px 0 0;
  padding: 10px;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.1);
}

.domestic-content-video-card video {
  display: block;
  width: 100%;
  max-height: min(68vh, 680px);
  border-radius: 8px;
  background: #0f172a;
}

.domestic-content-video-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.domestic-content-video-card figcaption span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.domestic-content-video-card figcaption strong,
.domestic-content-video-card figcaption em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domestic-content-video-card figcaption strong {
  color: #172033;
  font-size: 14px;
  font-style: normal;
}

.domestic-content-video-card figcaption em {
  color: #718096;
  font-size: 12px;
  font-style: normal;
}

.domestic-content-video-card button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #2f73ff;
  border-radius: 9px;
  background: #2f73ff;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.domestic-content-video-card button:hover {
  background: #1f5fdf;
}

.domestic-content-video-card button:disabled {
  cursor: progress;
  opacity: 0.66;
}

@media (max-width: 640px) {
  .domestic-content-video-card figcaption {
    align-items: stretch;
    flex-direction: column;
  }

  .domestic-content-video-card button {
    width: 100%;
  }
}

.generated-music-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  grid-template-areas:
    "art copy"
    "audio audio";
  align-items: center;
  gap: 8px 12px;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(239, 250, 255, 0.98), rgba(244, 241, 255, 0.98));
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.12);
}

/* 音乐卡的标题很短，无需为悬浮工具栏预留整块空白，避免卡片右侧显得松散。 */
.message.agent.has-chat-image-actions > span > .rich-ai-reply > .generated-music-card {
  padding-right: 12px;
}

.generated-music-art {
  position: relative;
  grid-area: art;
  width: 68px;
  height: 68px;
  align-self: center;
  justify-self: center;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0 10%, #2f73ff 11% 17%, #14213e 18% 22%, #2759a4 23% 27%, #111827 28% 100%);
  box-shadow: 0 12px 28px rgba(47, 115, 255, 0.3);
  transform-origin: center;
}

.generated-music-art::after {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: inherit;
  content: "";
}

.generated-music-art span {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: #2f73ff;
  font-size: 15px;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.generated-music-card figcaption {
  grid-area: copy;
  display: grid;
  gap: 2px;
  align-self: center;
}

.generated-music-card figcaption strong {
  color: #13233e;
  font-size: 16px;
}

.generated-music-card figcaption small {
  color: #7184a1;
  font-size: 12px;
}

.generated-music-card audio {
  grid-area: audio;
  width: 100%;
  min-width: 0;
  height: 32px;
  align-self: end;
}

.generated-music-recover-button {
  grid-column: 1 / -1;
  min-height: 36px;
  justify-self: start;
}

.generated-music-recovery-status {
  grid-column: 1 / -1;
  display: block;
  max-width: 100%;
  color: #9a5b18;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.generated-music-recovery-status[hidden],
.generated-music-recover-button[hidden] {
  display: none;
}

.generated-music-candidates {
  grid-area: tabs;
  display: flex;
  gap: 6px;
  align-items: center;
}

.generated-music-card.has-candidates {
  grid-template-areas:
    "art copy"
    "tabs tabs"
    "audio audio";
}

.generated-music-card.has-lyrics {
  grid-template-columns: 72px minmax(0, 0.86fr) minmax(0, 1.14fr);
  grid-template-areas:
    "art copy lyrics"
    "tabs tabs lyrics"
    "audio audio lyrics";
  gap: 10px 14px;
  align-items: center;
  padding: 14px;
}

.generated-music-card.has-lyrics:not(.has-candidates) {
  grid-template-areas:
    "art copy lyrics"
    "audio audio lyrics";
}

.generated-music-lyrics {
  grid-area: lyrics;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(174, 201, 243, 0.72);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.generated-music-lyrics[hidden] {
  display: none;
}

.generated-music-lyrics > header {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(196, 214, 241, 0.72);
  padding: 7px 10px 7px 12px;
}

.generated-music-lyrics > header > div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.generated-music-lyrics > header strong {
  color: #172844;
  font-size: 13px;
  line-height: 1.3;
}

.generated-music-lyrics > header small {
  color: #8090a9;
  font-size: 10px;
  line-height: 1.3;
}

.generated-music-lyrics > header button {
  min-height: 28px;
  border: 0;
  border-radius: 8px;
  padding: 4px 8px;
  background: rgba(47, 115, 255, 0.08);
  color: #2f73ff;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.generated-music-lyrics-scroll {
  height: 170px;
  overflow: auto;
  padding: 64px 14px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(111, 143, 190, 0.45) transparent;
  overscroll-behavior: contain;
}

.generated-music-lyrics-empty {
  display: grid;
  min-height: 42px;
  margin: 0;
  place-items: center;
  color: #71819a;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.generated-music-lyrics.is-collapsed .generated-music-lyrics-scroll {
  display: none;
}

.generated-music-lyric-line,
.generated-music-lyric-section,
.generated-music-timeline-line {
  margin: 0;
  transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.generated-music-lyric-section {
  padding: 12px 0 4px;
  color: #7f91ad;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.generated-music-lyric-section:first-child {
  padding-top: 0;
}

.generated-music-lyric-line {
  padding: 5px 0;
  color: #71819a;
  font-size: 13px;
  line-height: 1.55;
  opacity: 0.68;
}

.generated-music-lyric-line.is-active {
  color: #1e5fdb;
  font-weight: 800;
  opacity: 1;
  transform: translateX(4px);
}

.generated-music-timeline-line {
  padding: 4px 0 10px;
  color: #71819a;
  font-size: 14px;
  line-height: 1.9;
}

.message .generated-music-lyric-word {
  display: inline;
  border-radius: 4px;
  padding: 1px 2px;
  opacity: 0.58;
  transition: color 120ms ease, background-color 120ms ease, opacity 120ms ease;
}

.message .generated-music-lyric-word.is-active {
  background: rgba(47, 115, 255, 0.12);
  color: #174fb5;
  font-weight: 850;
  opacity: 1;
}

.message .generated-music-lyric-word.is-uncertain {
  opacity: 0.42;
}

.generated-music-candidate {
  min-height: 28px;
  border: 1px solid #c8d9f7;
  border-radius: 999px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.8);
  color: #58708f;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.generated-music-candidate.is-active {
  border-color: #2f73ff;
  background: #2f73ff;
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 115, 255, 0.2);
}

.chat-message-row.agent .message-stack:has(.generated-music-card) {
  width: min(82%, 1100px);
  max-width: min(82%, 1100px);
}

.message.agent:has(.generated-music-card) {
  width: 100%;
}

.message.agent:has(.generated-music-card) > span,
.message.agent:has(.generated-music-card) .rich-ai-reply {
  width: 100%;
}

.generated-music-card.is-playing .generated-music-art {
  animation: generated-music-record-spin 5s linear infinite;
}

@keyframes generated-music-record-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 760px) {
  .generated-music-card.has-lyrics,
  .generated-music-card.has-lyrics:not(.has-candidates) {
    grid-template-columns: 60px minmax(0, 1fr);
    grid-template-areas:
      "art copy"
      "tabs tabs"
      "audio audio"
      "lyrics lyrics";
  }

  .generated-music-card.has-lyrics:not(.has-candidates) {
    grid-template-areas:
      "art copy"
      "audio audio"
      "lyrics lyrics";
  }

  .generated-music-lyrics-scroll {
    height: 150px;
    padding-block: 54px;
  }
}

@media (max-width: 560px) {
  .generated-music-card {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 7px 10px;
    padding: 10px;
  }

  .generated-music-art {
    width: 60px;
    height: 60px;
  }

  .generated-music-card figcaption small {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .generated-music-card.is-playing .generated-music-art {
    animation: none;
  }

  .generated-music-lyric-line {
    transition: none;
  }

  .message .generated-music-lyric-word {
    transition: none;
  }

  .generated-music-lyrics-scroll {
    scroll-behavior: auto;
  }
}

.generated-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(8px);
  cursor: zoom-out;
}

.generated-image-lightbox img {
  display: block;
  max-width: min(94vw, 1280px);
  max-height: 90vh;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  cursor: default;
}

.generated-image-lightbox-close {
  position: fixed;
  top: 22px;
  right: 24px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #1f2937;
  cursor: pointer;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.image-lightbox-open {
  overflow: hidden;
}

.rich-ai-reply strong {
  display: inline;
  margin: 0;
  color: #0f172a;
  font-size: inherit;
  font-weight: 1000;
  opacity: 1;
}

.rich-ai-reply code {
  border-radius: 5px;
  padding: 1px 5px;
  background: #e8f1ff;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.ai-table-wrap {
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 2px 0;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  overscroll-behavior-inline: contain;
}

.ai-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  color: #172033;
  font-size: 13px;
  line-height: 1.55;
}

.ai-table th,
.ai-table td {
  border-bottom: 1px solid #dde9ff;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ai-table th {
  background: linear-gradient(135deg, #f2f7ff, #eaf4ff);
  color: #2f73ff;
  font-weight: 800;
  white-space: nowrap;
}

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

.message.agent > span,
.message.agent .rich-ai-reply {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 720px) {
  .ai-table-columns-2 .ai-table {
    min-width: 0;
    table-layout: fixed;
  }

  .ai-table-columns-2 .ai-table th,
  .ai-table-columns-2 .ai-table td {
    padding: 8px;
    white-space: normal;
  }

  .ai-table-columns-2 .ai-table th:first-child,
  .ai-table-columns-2 .ai-table td:first-child {
    width: 34%;
  }

  .dashboard-recent-work-panel {
    padding: 14px;
  }

  .dashboard-recent-work-heading {
    align-items: start;
  }

  .dashboard-recent-work-heading p {
    display: none;
  }

  .dashboard-recent-work-grid {
    grid-template-columns: 1fr;
  }
}

.chat-input {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-areas:
    "files files files"
    "input input input"
    "tools voice send";
  grid-template-columns: 1fr 30px 30px;
  gap: 5px;
  margin: 10px 40px;
  border: 1px solid #d8e6ff;
  border-radius: 14px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 26px rgba(37, 71, 123, 0.09);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.chat-input.drag-over {
  border-color: #2f73ff;
  background: rgba(247, 251, 255, 0.98);
  box-shadow: 0 16px 38px rgba(47, 115, 255, 0.2), inset 0 0 0 1px rgba(47, 115, 255, 0.14);
}

.mention-menu {
  position: absolute;
  left: 56px;
  top: auto;
  bottom: calc(100% - 8px);
  z-index: 80;
  width: 360px;
  max-width: calc(100% - 28px);
  max-height: 260px;
  overflow: auto;
  border: 1px solid #cfe0ff;
  border-radius: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(37, 71, 123, 0.18);
}

.mention-menu button {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.mention-menu button:hover {
  background: #eef5ff;
}

.mention-menu img,
.mention-menu .role-avatar-wrap,
.mention-avatar {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.mention-menu strong,
.mention-menu small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mention-menu strong {
  font-size: 14px;
}

.mention-menu small {
  margin-top: 2px;
  color: #6b778c;
  font-size: 12px;
  font-weight: 700;
}

.chat-attachments {
  grid-area: files;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-attachments:empty {
  display: none;
}

.attachment-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 240px;
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  padding: 9px 30px 9px 11px;
  background: #f7fbff;
  color: #516179;
  font-size: 12px;
  font-weight: 800;
}

.attachment-chip button {
  position: absolute;
  top: 5px;
  right: 6px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #e8f0fb;
  color: #7b8798;
  cursor: pointer;
  line-height: 1;
}

#chatAttachments .attachment-chip.image-only .attachment-chip-preview {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  border-radius: 0;
  background: #f5f8fd;
  cursor: pointer;
}

.chat-tools {
  grid-area: tools;
  display: grid;
  gap: 8px;
  align-content: end;
  justify-content: start;
}

.chat-tools label,
.voice-input-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #d8e6ff;
  border-radius: 50%;
  background: #f8fbff;
  color: #5f6b7a;
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.voice-input-button {
  grid-area: voice;
  font-size: 14px;
  letter-spacing: 0;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.voice-mic-icon {
  position: relative;
  display: block;
  width: 14px;
  height: 16px;
  color: currentColor;
}

.voice-mic-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 3px;
  width: 8px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 7px;
  box-sizing: border-box;
}

.voice-mic-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 0;
  width: 10px;
  height: 8px;
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 8px 8px;
  box-shadow: inset 0 -2px 0 -1px currentColor;
}

.voice-input-button:hover:not(:disabled) {
  border-color: #9dc3ff;
  color: #2873ff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(40, 115, 255, 0.16);
}

.voice-input-button.recording {
  border-color: #2f73ff;
  background: #eef5ff;
  color: #2f73ff;
  box-shadow: 0 0 0 6px rgba(47, 115, 255, 0.1);
}

.voice-input-button.unsupported {
  cursor: pointer;
  opacity: 0.72;
}

.chat-tools input {
  display: none;
}

.chat-input textarea {
  grid-area: input;
  min-height: 36px;
  max-height: 180px;
  border: 0;
  border-radius: 10px;
  padding: 6px 8px;
  background: transparent;
  font-size: 13px;
  line-height: 1.55;
  overflow-y: hidden;
  resize: none;
  outline: none;
}

.chat-input .create-button {
  grid-area: send;
  align-self: end;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.chat-input .chat-submit-button.stopping {
  background: #fff1f2;
  color: #e11d48;
  box-shadow: 0 10px 22px rgba(225, 29, 72, 0.18);
}

.chat-input .chat-submit-button.stopping:hover {
  background: #ffe4e8;
  color: #be123c;
}

.employee-chat-panel {
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  background:
    radial-gradient(circle at 14% 0%, rgba(47, 115, 255, 0.12), transparent 30%),
    radial-gradient(circle at 92% 14%, rgba(26, 184, 255, 0.1), transparent 30%),
    #fff;
  box-shadow: 0 20px 46px rgba(37, 71, 123, 0.1);
}

.employee-chat-panel .chat-messages {
  background:
    linear-gradient(rgba(47, 115, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 115, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
}

.group-chat-input {
  z-index: 30;
  grid-template-columns: 1fr 34px 34px;
  grid-template-rows: auto 64px 34px;
  align-items: end;
  align-self: end;
  max-height: 220px;
  overflow: visible;
  margin-top: 4px;
}

.group-chat-input .voice-input-button,
.group-chat-input > button[type="submit"] {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  align-self: end;
  justify-self: center;
}

.chat-panel.group-chat-panel {
  position: relative;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.group-workspace-head {
  display: none;
  border-bottom: 1px solid #dce8f8;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.9)),
    #fff;
}

.group-workspace-overview {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  padding: 12px 16px;
}

.group-workspace-title {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
}

.group-workspace-title span,
.group-workspace-phases span,
.group-communication-head span,
.group-workspace-section > header span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.group-workspace-title h2 {
  overflow: hidden;
  margin: 0;
  color: #172033;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-workspace-title p {
  margin: 0;
  color: #65758d;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.6;
}

.group-workspace-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  gap: 8px;
  min-width: 320px;
}

.group-workspace-metrics article {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 52px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.88);
}

.group-workspace-metrics article.warn {
  border-color: #ffd2ca;
  background: #fff7f5;
}

.group-workspace-metrics span {
  color: #718099;
  font-size: 10px;
  font-weight: 850;
}

.group-workspace-metrics strong {
  overflow: hidden;
  color: #172033;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-workspace-phases {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.group-workspace-phases div {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 3px 8px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.group-workspace-phases i {
  grid-row: span 2;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: #eef5ff;
  color: #7b8aa1;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.group-workspace-phases strong {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-workspace-phases div.done i {
  background: #e8fff4;
  color: #0ca66b;
}

.group-workspace-phases div.active {
  border-color: #9fc4ff;
  background: #f2f7ff;
}

.group-workspace-phases div.active i {
  background: linear-gradient(135deg, #2f73ff, #21b9ff);
  color: #fff;
}

.group-workspace-phases div.locked {
  opacity: 0.62;
}

.group-chat-hero {
  position: relative;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #dce8f8;
  padding: 14px 18px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.9)),
    #fff;
}

.group-chat-hero strong {
  font-size: 19px;
}

.group-workspace-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.group-workbench-panel,
.group-communication-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.group-workbench-panel {
  position: absolute;
  inset: 82px 16px 104px;
  z-index: 70;
  display: none;
  max-height: none;
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(31, 65, 119, 0.22);
}

.group-chat-panel.workbench-open::before {
  content: "";
  position: absolute;
  inset: 74px 0 94px;
  z-index: 60;
  background: rgba(247, 250, 255, 0.74);
  backdrop-filter: blur(3px);
}

.group-chat-panel.workbench-open .group-workbench-panel {
  display: block;
}

.group-communication-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: auto;
  min-height: 0;
  background: #fff;
}

.group-communication-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e4edf9;
  padding: 12px 16px;
  background: rgba(248, 251, 255, 0.9);
}

.group-communication-head strong {
  display: block;
  margin-top: 2px;
  color: #172033;
  font-size: 14px;
  font-weight: 950;
}

.group-communication-head em {
  max-width: 360px;
  color: #718099;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.5;
  text-align: right;
}

.group-chat-input textarea {
  height: auto;
  min-height: 36px;
  max-height: 180px;
  overflow-y: hidden;
  resize: none;
}

.group-execution-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  flex: 0 0 auto;
  max-width: 460px;
  border-bottom: 0;
  padding: 0;
  background: transparent;
}

.group-execution-tabs button {
  min-height: 38px;
  border: 1px solid #d8e6ff;
  border-radius: 999px;
  padding: 9px 16px;
  background: #fff;
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
}

.group-execution-tabs button.active {
  border-color: #9fc4ff;
  background: #eef5ff;
  color: #2f73ff;
  box-shadow: 0 8px 18px rgba(47, 115, 255, 0.12);
}

.group-execution-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  max-height: none;
  overflow: hidden;
  border-bottom: 0;
  padding: 0;
  background: #fff;
}

.group-execution-panel.hidden {
  display: none;
}

.group-workbench-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #dce8f8;
  padding: 13px 16px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 255, 0.94)),
    #fff;
}

.group-workbench-toolbar div {
  display: grid;
  gap: 3px;
}

.group-workbench-toolbar span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.group-workbench-toolbar strong {
  color: #172033;
  font-size: 18px;
  font-weight: 950;
}

.group-workbench-toolbar button {
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.group-workbench-content {
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

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

@media (max-width: 1280px) {
  .group-workspace-body {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
  }

  .group-workbench-panel {
    inset: 82px 12px 100px;
    max-height: none;
  }

  .group-communication-panel {
    min-height: 0;
  }
}

@media (max-width: 820px) {
  .group-workspace-overview,
  .group-workspace-metrics,
  .group-workspace-phases {
    grid-template-columns: 1fr;
  }

  .group-workspace-title h2 {
    white-space: normal;
  }

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

  .group-communication-head em {
    max-width: none;
    text-align: left;
  }

  .execution-summary {
    grid-template-columns: 1fr;
  }

  .execution-next-step {
    align-items: stretch;
    flex-direction: column;
  }

  .execution-next-step-actions,
  .execution-next-step button {
    width: 100%;
  }
}

.execution-summary div,
.execution-task,
.execution-org-node,
.execution-asset-list article,
.execution-empty {
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  background: #fff;
}

.execution-summary div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.execution-summary span,
.execution-task footer,
.execution-org-node footer,
.execution-asset-list span,
.execution-empty span {
  color: #64748b;
  font-size: 11px;
  line-height: 1.55;
}

.execution-summary strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-parallel-status {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1.4fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #b9d4ff;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f5f9ff;
}

.group-parallel-status > div:first-child {
  display: grid;
  gap: 3px;
}

.group-parallel-status strong {
  color: #1e4fa8;
  font-size: 14px;
}

.group-parallel-status span,
.group-parallel-status li {
  color: #63748c;
  font-size: 11px;
}

.group-parallel-progress {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.group-parallel-progress i,
.execution-task-progress i {
  display: block;
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: #dce9fb;
}

.group-parallel-progress i b,
.execution-task-progress i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2f73ff;
  transition: width 220ms ease-out;
}

.group-parallel-progress em {
  color: #2f73ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.group-parallel-status ul {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

.group-parallel-status li b {
  color: #203c68;
  font-size: 13px;
}

.execution-next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #a9d9c8;
  border-radius: 8px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f2fff9 0%, #f7fbff 100%);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.08);
}

.execution-next-step.running {
  border-color: #bcd3ff;
  background: linear-gradient(135deg, #f3f7ff 0%, #f8fbff 100%);
  box-shadow: 0 12px 28px rgba(47, 115, 255, 0.08);
}

.execution-next-step.complete {
  border-color: #cfd8e6;
  background: #fff;
  box-shadow: none;
}

.execution-next-step > div:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.execution-next-step span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 900;
}

.execution-next-step strong {
  color: #152033;
  font-size: 15px;
  font-weight: 900;
}

.execution-next-step p {
  margin: 0;
  color: #56677f;
  font-size: 12px;
  line-height: 1.55;
}

.execution-next-step small {
  color: #0f8f64;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.5;
}

.execution-next-step-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.execution-next-step button {
  min-height: 34px;
  border: 1px solid #2f73ff;
  border-radius: 7px;
  padding: 0 14px;
  background: #2f73ff;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.execution-next-step button:disabled {
  border-color: #d9e2ef;
  background: #f4f7fb;
  color: #94a3b8;
  cursor: default;
}

.execution-task-list,
.execution-org-list,
.execution-asset-list {
  display: grid;
  gap: 8px;
}

.execution-task {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}

.execution-task i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #eef5ff;
  color: #2f73ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.execution-task.done i {
  background: #e8fff4;
  color: #0ca66b;
}

.execution-task.running i,
.execution-task.waiting i {
  background: #fff7e8;
  color: #dc6803;
}

.execution-task.review i {
  background: #f3efff;
  color: #7542d4;
}

.execution-task-review {
  border-left: 3px solid #7542d4;
  padding: 7px 9px;
  background: #f8f5ff;
  color: #5f3bb3 !important;
  font-weight: 800;
}

.execution-task.failed {
  border-color: #f4b7b2;
}

.execution-task.failed i {
  background: #fff1f0;
  color: #d92d20;
}

.execution-task-advice {
  border-left: 3px solid #2f73ff;
  padding: 8px 10px;
  background: #f4f8ff;
  color: #33506f;
  font-size: 12px;
  font-weight: 800;
}

.execution-task header,
.execution-org-node header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.execution-task strong,
.execution-org-node strong,
.execution-asset-list strong,
.execution-empty strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.execution-task header span,
.execution-org-node header span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  background: #f2f7ff;
  color: #2f73ff;
  font-size: 11px;
  font-weight: 800;
}

.execution-task p,
.execution-org-node p {
  margin: 5px 0 7px;
  color: #56677f;
  font-size: 12px;
  line-height: 1.6;
}

.execution-task-phase {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 6px 0 4px;
}

.execution-task-phase span {
  border-radius: 999px;
  padding: 3px 8px;
  background: #edf5ff;
  color: #2f73ff;
  font-size: 10px;
  font-weight: 900;
}

.execution-task-phase em {
  color: #708098;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.execution-task-progress {
  display: grid;
  grid-template-columns: minmax(90px, 160px) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}

.execution-task-progress span {
  overflow: hidden;
  color: #718099;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.execution-task footer,
.execution-org-node footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.execution-task footer > span {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.execution-task-owner {
  display: flex;
  align-items: center;
  gap: 5px;
}

.execution-task-owner select {
  max-width: 132px;
  height: 28px;
  border: 1px solid #d4dfef;
  border-radius: 6px;
  padding: 0 24px 0 8px;
  background: #fff;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
}

.execution-task-owner select:disabled {
  background: #f5f7fa;
  color: #94a3b8;
}

.execution-task em,
.execution-org-node em {
  color: #334155;
  font-style: normal;
  font-weight: 800;
}

.execution-task-error {
  border-left: 3px solid #d92d20;
  padding: 7px 9px;
  background: #fff5f4;
  color: #b42318 !important;
}

.execution-subtask-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0;
  border-top: 1px solid #edf2f8;
  padding-top: 8px;
}

.execution-subtask-summary span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.execution-subtask-summary button {
  border: 0;
  background: transparent;
  color: #2f73ff;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.execution-subtask-editor {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  border: 1px solid #dbe6f7;
  border-radius: 7px;
  padding: 9px;
  background: #f8fbff;
}

.execution-subtask-list {
  display: grid;
  gap: 6px;
}

.execution-subtask-row {
  display: grid;
  grid-template-columns: 68px minmax(120px, 1fr) minmax(100px, 132px) 28px;
  gap: 6px;
  align-items: center;
}

.execution-subtask-status {
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
}

.execution-subtask-status.done {
  color: #0ca66b;
}

.execution-subtask-status.failed {
  color: #d92d20;
}

.execution-subtask-row input,
.execution-subtask-row select,
.execution-subtask-batch textarea {
  width: 100%;
  border: 1px solid #d4dfef;
  border-radius: 6px;
  padding: 7px 8px;
  background: #fff;
  color: #334155;
  font-size: 11px;
}

.execution-subtask-row button {
  width: 28px;
  height: 28px;
  border: 1px solid #f1b8b3;
  border-radius: 6px;
  background: #fff;
  color: #d92d20;
  cursor: pointer;
}

.execution-subtask-row button:disabled {
  border-color: #e2e8f0;
  color: #a7b2c2;
  cursor: default;
}

.execution-subtask-batch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.execution-subtask-batch textarea {
  min-height: 58px;
  resize: vertical;
}

.execution-subtask-batch button {
  min-width: 78px;
  border: 1px solid #2f73ff;
  border-radius: 6px;
  padding: 0 10px;
  background: #2f73ff;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.execution-contract-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0;
  border-top: 1px solid #edf2f8;
  padding-top: 8px;
}

.execution-contract-summary span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.execution-contract-summary button,
.execution-contract-editor section > header button {
  border: 0;
  background: transparent;
  color: #2f73ff;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.execution-contract-editor {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  border: 1px solid #dbe6f7;
  border-radius: 7px;
  padding: 10px;
  background: #f8fbff;
}

.execution-contract-editor section {
  display: grid;
  gap: 7px;
}

.execution-contract-editor section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.execution-contract-editor section > header strong {
  font-size: 12px;
}

.execution-contract-list {
  display: grid;
  gap: 6px;
}

.execution-contract-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 105px minmax(100px, 130px) 58px 28px;
  gap: 6px;
  align-items: center;
}

.execution-contract-row input[type="text"],
.execution-contract-row input[type="number"],
.execution-contract-row select {
  width: 100%;
  height: 30px;
  border: 1px solid #d4dfef;
  border-radius: 6px;
  padding: 0 7px;
  background: #fff;
  color: #334155;
  font-size: 10px;
}

.execution-contract-source-placeholder {
  color: #94a3b8;
  font-size: 10px;
  text-align: center;
}

.execution-contract-required,
.execution-contract-length {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #64748b;
  font-size: 10px;
  white-space: nowrap;
}

.execution-contract-length input[type="number"] {
  width: 54px;
}

.execution-contract-row > button {
  width: 28px;
  height: 28px;
  border: 1px solid #f1b8b3;
  border-radius: 6px;
  background: #fff;
  color: #d92d20;
  cursor: pointer;
}

.execution-contract-row > button:disabled,
.execution-contract-editor button:disabled {
  border-color: #e2e8f0;
  color: #a7b2c2;
  cursor: default;
}

.execution-task-actions {
  display: flex;
  gap: 7px;
  flex: 0 0 auto;
}

.execution-task-actions button {
  min-width: 82px;
  height: 30px;
  border: 1px solid #bcd3ff;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: #2f73ff;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.execution-task.done .execution-task-actions button,
.execution-task.running .execution-task-actions button:not(:disabled) {
  border-color: #2f73ff;
  background: #2f73ff;
  color: #fff;
}

.execution-task-actions button:disabled {
  border-color: #e0e7f1;
  background: #f5f7fa;
  color: #9aa8ba;
  cursor: default;
}

.execution-org-brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
}

.execution-org-brief span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 950;
}

.execution-org-brief strong {
  display: block;
  margin-top: 4px;
  color: #172033;
  font-size: 19px;
}

.execution-org-brief p {
  margin: 6px 0 0;
  color: #61728a;
  font-size: 12px;
  line-height: 1.6;
}

.execution-org-brief ol,
.execution-org-missions {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.execution-org-brief li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe8f8;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.execution-org-brief li i {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #eaf2ff;
  color: #2f73ff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.execution-org-brief li span,
.execution-org-missions span {
  overflow: hidden;
  color: #41536b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.execution-org-brief li strong {
  margin: 0;
  color: #2f73ff;
  font-size: 11px;
}

.execution-org-missions {
  margin: 8px 0;
}

.execution-org-missions span {
  border-radius: 7px;
  padding: 6px 8px;
  background: #f4f8ff;
  font-weight: 800;
}

.task-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 370;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(10px);
}

.task-result-overlay.hidden {
  display: none;
}

.task-preflight-overlay {
  position: fixed;
  inset: 0;
  z-index: 372;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
}

.task-preflight-overlay.hidden {
  display: none;
}

.group-member-replace-overlay {
  position: fixed;
  inset: 0;
  z-index: 374;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(10px);
}

.group-member-replace-overlay.hidden {
  display: none;
}

.group-member-replace-modal {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(560px, 94vw);
  max-height: min(680px, 88vh);
  overflow: hidden;
  border: 1px solid #cbdcf8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.26);
  animation: agentDetailSpringIn 0.3s cubic-bezier(0.18, 0.9, 0.28, 1.08) both;
}

.group-member-replace-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 1px solid #d9e5f8;
  border-radius: 8px;
  background: #fff;
  color: #5f6f87;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
}

.group-member-replace-head {
  padding: 18px 56px 14px 22px;
  border-bottom: 1px solid #dbe6f7;
  background:
    radial-gradient(circle at 88% 12%, rgba(47, 115, 255, 0.14), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}

.group-member-replace-head span {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid #c5dcff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #2f73ff;
  font-size: 11px;
  font-weight: 900;
}

.group-member-replace-head h2 {
  margin: 9px 0 4px;
  color: #111827;
  font-size: 20px;
  line-height: 1.2;
}

.group-member-replace-head p {
  margin: 0;
  color: #607086;
  font-size: 12px;
  line-height: 1.5;
}

.group-member-replace-current {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid #e3ecfb;
  background: #fbfdff;
}

.group-member-replace-current > span {
  color: #7a8ba2;
  font-size: 12px;
  font-weight: 900;
}

.group-member-replace-current > div {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.group-member-replace-current strong {
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.group-member-replace-current em {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef5ff;
  color: #2f73ff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.group-member-replace-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid #d8e6fb;
  border-radius: 13px;
  background: #f5f9ff;
  object-fit: contain;
}

.group-member-replace-list {
  display: grid;
  gap: 9px;
  overflow: auto;
  padding: 14px 22px;
}

.group-member-replace-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid #d8e6fb;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.group-member-replace-option:hover,
.group-member-replace-option:focus-visible {
  border-color: #8db6ff;
  box-shadow: 0 14px 32px rgba(47, 115, 255, 0.14);
  outline: none;
  transform: translateY(-1px);
}

.group-member-replace-option-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.group-member-replace-option-copy strong {
  overflow: hidden;
  color: #142033;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-member-replace-option-copy small {
  overflow: hidden;
  color: #6f7f96;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-member-replace-option-copy em {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef5ff;
  color: #2f73ff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-member-replace-empty {
  display: grid;
  gap: 8px;
  min-height: 120px;
  place-items: center;
  padding: 18px;
  border: 1px dashed #cbdcf8;
  border-radius: 10px;
  background: #f8fbff;
  color: #6f7f96;
  text-align: center;
}

.group-member-replace-empty strong {
  color: #142033;
  font-size: 14px;
}

.group-member-replace-actions {
  display: flex;
  justify-content: flex-end;
  padding: 12px 22px 16px;
  border-top: 1px solid #e3ecfb;
  background: #fff;
}

.group-agent-match-overlay {
  position: fixed;
  inset: 0;
  z-index: 375;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(10px);
}

.group-agent-match-overlay.hidden {
  display: none;
}

.group-agent-match-modal {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(700px, 94vw);
  max-height: min(720px, 88vh);
  overflow: hidden;
  border: 1px solid #cbdcf8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.26);
  animation: agentDetailSpringIn 0.3s cubic-bezier(0.18, 0.9, 0.28, 1.08) both;
}

.group-agent-match-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 1px solid #d9e5f8;
  border-radius: 8px;
  background: #fff;
  color: #5f6f87;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
}

.group-agent-match-head {
  padding: 18px 56px 14px 22px;
  border-bottom: 1px solid #dbe6f7;
  background:
    radial-gradient(circle at 88% 12%, rgba(47, 115, 255, 0.14), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}

.group-agent-match-head span {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid #c5dcff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #2f73ff;
  font-size: 11px;
  font-weight: 900;
}

.group-agent-match-head h2 {
  margin: 9px 0 4px;
  color: #111827;
  font-size: 20px;
  line-height: 1.2;
}

.group-agent-match-head p,
.group-agent-match-context p {
  margin: 0;
  color: #607086;
  font-size: 12px;
  line-height: 1.55;
}

.group-agent-match-context {
  display: grid;
  gap: 5px;
  padding: 11px 22px;
  border-bottom: 1px solid #e3ecfb;
  background: #fbfdff;
}

.group-agent-match-context strong {
  color: #203252;
  font-size: 13px;
}

.group-agent-match-list {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 14px 22px;
}

.group-agent-match-loading,
.group-agent-match-empty {
  display: grid;
  min-height: 150px;
  place-items: center;
  gap: 9px;
  padding: 18px;
  border: 1px dashed #cbdcf8;
  border-radius: 11px;
  background: #f8fbff;
  color: #6f7f96;
  text-align: center;
}

.group-agent-match-loading span {
  width: 28px;
  height: 28px;
  border: 3px solid #c8dcff;
  border-top-color: #2f73ff;
  border-radius: 50%;
  animation: groupAgentMatchSpin 0.8s linear infinite;
}

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

.group-agent-match-summary {
  padding: 10px 12px;
  border: 1px solid #d9e8ff;
  border-radius: 10px;
  background: linear-gradient(135deg, #f7fbff, #fff);
  color: #3d516f;
  font-size: 12px;
  line-height: 1.6;
}

.group-agent-match-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid #d8e6fb;
  border-radius: 11px;
  background: #fff;
}

.group-agent-match-avatar {
  width: 46px;
  height: 46px;
  border: 1px solid #d8e6fb;
  border-radius: 14px;
  background: #f5f9ff;
  object-fit: contain;
}

.group-agent-match-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.group-agent-match-copy strong {
  overflow: hidden;
  color: #142033;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-agent-match-copy em {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: #2f73ff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-agent-match-copy small {
  color: #61738c;
  font-size: 12px;
  line-height: 1.45;
}

.group-agent-match-score {
  display: grid;
  min-width: 48px;
  place-items: center;
  gap: 2px;
  color: #2f73ff;
  font-size: 15px;
  font-weight: 900;
}

.group-agent-match-score small {
  color: #8a9bb1;
  font-size: 9px;
  font-weight: 800;
}

.group-agent-match-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px 16px;
  border-top: 1px solid #e3ecfb;
  background: #fff;
}

.group-agent-match-actions > small {
  max-width: 330px;
  color: #687991;
  font-size: 10px;
  line-height: 1.5;
}

.group-agent-match-actions > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 640px) {
  .group-agent-match-overlay { padding: 10px; }
  .group-agent-match-modal { width: 100%; max-height: 86vh; }
  .group-agent-match-head { padding: 14px 48px 12px 16px; }
  .group-agent-match-context,
  .group-agent-match-list,
  .group-agent-match-actions { padding-left: 16px; padding-right: 16px; }
  .group-agent-match-option { grid-template-columns: auto minmax(0, 1fr); }
  .group-agent-match-score { display: none; }
  .group-agent-match-actions { align-items: flex-start; flex-direction: column; }
  .group-agent-match-actions > small { max-width: none; }
  .group-agent-match-actions > div { width: 100%; justify-content: stretch; }
  .group-agent-match-actions button { flex: 1; }
}

.team-staffing-overlay {
  position: fixed;
  inset: 0;
  z-index: 375;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(10px);
}

.team-staffing-overlay.hidden {
  display: none;
}

.team-staffing-modal {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(780px, 96vw);
  max-height: min(820px, 90vh);
  overflow: hidden;
  border: 1px solid #cbdcf8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 30px 78px rgba(15, 23, 42, 0.28);
}

.team-staffing-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 1px solid #d9e5f8;
  border-radius: 8px;
  background: #fff;
  color: #5f6f87;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
}

.team-staffing-head {
  padding: 18px 56px 15px 22px;
  border-bottom: 1px solid #dbe6f7;
  background: #f5f9ff;
}

.team-staffing-head > span {
  color: #2f73ff;
  font-size: 11px;
  font-weight: 900;
}

.team-staffing-head h2 {
  margin: 6px 0 5px;
  color: #111827;
  font-size: 20px;
}

.team-staffing-head p {
  margin: 0;
  color: #607086;
  font-size: 12px;
  line-height: 1.55;
}

.team-staffing-funds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.team-staffing-funds div {
  display: grid;
  gap: 3px;
  border: 1px solid #d6e3f6;
  border-radius: 7px;
  padding: 9px 11px;
  background: #fff;
}

.team-staffing-funds span {
  color: #718199;
  font-size: 10px;
  font-weight: 800;
}

.team-staffing-funds strong {
  color: #172033;
  font-size: 15px;
  font-weight: 900;
}

.team-staffing-funds strong.negative {
  color: #d92d20;
}

.team-staffing-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding: 14px 22px;
}

.team-staffing-list article {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 0.9fr) minmax(190px, 0.9fr);
  align-items: center;
  gap: 12px;
  border: 1px solid #dbe6f7;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
}

.team-staffing-list article.ready {
  border-color: #b9e2d3;
  background: #f8fffc;
}

.team-staffing-list article.missing {
  border-color: #f0d5a5;
}

.team-staffing-role,
.team-staffing-agent,
.team-staffing-list label {
  min-width: 0;
}

.team-staffing-role {
  display: grid;
  gap: 3px;
}

.team-staffing-role span,
.team-staffing-list label > span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 900;
}

.team-staffing-role strong,
.team-staffing-agent strong {
  overflow: hidden;
  color: #142033;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-staffing-role small {
  overflow: hidden;
  color: #6f7f96;
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-staffing-agent {
  display: flex;
  align-items: center;
  gap: 9px;
}

.team-staffing-agent > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.team-staffing-agent span {
  color: #6f7f96;
  font-size: 10px;
  font-weight: 800;
}

.team-staffing-agent em {
  color: #172033;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.team-staffing-list article.ready .team-staffing-agent span {
  color: #0b8a61;
}

.team-staffing-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
}

.team-staffing-list label {
  display: grid;
  gap: 5px;
}

.team-staffing-list select {
  width: 100%;
  height: 34px;
  border: 1px solid #cddcf1;
  border-radius: 7px;
  padding: 0 28px 0 9px;
  background: #fff;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
}

.team-staffing-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.team-staffing-row-actions label {
  flex: 1 1 150px;
}

.team-staffing-row-actions button {
  min-width: 64px;
  min-height: 32px;
  border-radius: 7px;
  padding: 0 10px;
  font-size: 10px;
  font-weight: 900;
}

.team-staffing-row-actions button:disabled {
  border: 1px solid #c8e4d9;
  background: #effbf6;
  color: #0b8a61;
}

.team-staffing-warning {
  margin: 0 22px 12px;
  border-left: 3px solid #d97706;
  padding: 8px 10px;
  background: #fff8eb;
  color: #9a5b06;
  font-size: 11px;
  font-weight: 800;
}

.team-staffing-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 22px 16px;
  border-top: 1px solid #e3ecfb;
  background: #f8fbff;
}

.team-staffing-actions > small {
  max-width: 330px;
  color: #687991;
  font-size: 10px;
  line-height: 1.5;
}

.team-staffing-actions > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 640px) {
  .group-member-replace-overlay {
    padding: 10px;
  }

  .group-member-replace-modal {
    width: 100%;
    max-height: 86vh;
  }

  .group-member-replace-head {
    padding: 14px 48px 12px 16px;
  }

  .group-member-replace-head h2 {
    font-size: 19px;
  }

  .group-member-replace-current {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 11px 16px;
  }

  .group-member-replace-list {
    padding: 12px 16px;
  }

  .group-member-replace-option {
    gap: 9px;
    padding: 9px;
  }

  .group-member-replace-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .group-member-replace-actions {
    padding: 10px 16px 14px;
  }

  .team-staffing-overlay {
    padding: 10px;
  }

  .team-staffing-modal {
    width: 100%;
    max-height: 88vh;
  }

  .team-staffing-list {
    padding: 12px 16px;
  }

  .team-staffing-list article {
    grid-template-columns: 1fr;
  }

  .team-staffing-funds {
    grid-template-columns: 1fr;
  }

  .team-staffing-head {
    padding: 15px 48px 13px 16px;
  }

  .team-staffing-row-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .team-staffing-row-actions button,
  .team-staffing-row-actions label {
    flex: 1 1 120px;
  }

  .team-staffing-actions {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 16px 14px;
  }

  .team-staffing-actions > small {
    max-width: none;
  }

  .team-staffing-actions > div,
  .team-staffing-actions button {
    width: 100%;
  }
}

.task-preflight-modal {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(820px, 96vw);
  max-height: min(860px, 90vh);
  overflow: hidden;
  border: 1px solid #cbdcf8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 36px 96px rgba(15, 23, 42, 0.3);
  animation: agentDetailSpringIn 0.3s cubic-bezier(0.18, 0.9, 0.28, 1.08) both;
}

.task-preflight-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid #d9e5f8;
  border-radius: 8px;
  background: #fff;
  color: #5f6f87;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

.task-preflight-head {
  padding: 24px 66px 20px 28px;
  border-bottom: 1px solid #dbe6f7;
  background: #f7faff;
}

.task-preflight-head > span,
.task-preflight-section-title span {
  color: #2f73ff;
  font-size: 11px;
  font-weight: 900;
}

.task-preflight-head h2 {
  margin: 5px 0;
  color: #172033;
  font-size: 24px;
  line-height: 1.35;
}

.task-preflight-head p,
.task-preflight-section-title small,
.task-preflight-input small,
.task-preflight-actions > span {
  margin: 0;
  color: #718099;
  font-size: 11px;
  line-height: 1.55;
}

.task-preflight-body {
  overflow: auto;
  padding: 22px 28px 30px;
}

.task-preflight-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e7edf7;
}

.task-preflight-summary div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.task-preflight-summary span,
.task-preflight-input > span {
  color: #718099;
  font-size: 11px;
  font-weight: 800;
}

.task-preflight-summary strong {
  color: #24334a;
  font-size: 13px;
  line-height: 1.6;
}

.task-preflight-section {
  padding: 22px 0 0;
}

.task-preflight-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.task-preflight-section-title h3 {
  margin: 4px 0 0;
  color: #24334a;
  font-size: 15px;
}

.task-preflight-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.task-preflight-checklist li {
  position: relative;
  padding-left: 20px;
  color: #4f6078;
  font-size: 12px;
  line-height: 1.5;
}

.task-preflight-checklist li::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 10px;
  height: 10px;
  border: 2px solid #8eb7ff;
  border-radius: 3px;
}

.task-preflight-checklist li.ready::before {
  background: #0ca66b;
  box-shadow: 0 0 0 3px #e8fff4;
}

.task-preflight-checklist li.missing {
  color: #b42318;
}

.task-preflight-checklist li.missing::before {
  background: #d92d20;
  box-shadow: 0 0 0 3px #fff1f0;
}

.task-preflight-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.task-preflight-context article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
  border-left: 3px solid #89b3ff;
  background: #f7faff;
}

.task-preflight-context strong {
  color: #2d3d55;
  font-size: 12px;
}

.task-preflight-context p,
.task-preflight-empty {
  margin: 0;
  color: #697991;
  font-size: 11px;
  line-height: 1.55;
}

.task-preflight-context article span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 850;
}

.task-preflight-empty {
  padding: 12px 14px;
  border: 1px dashed #d6e1f2;
}

.task-preflight-input {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.task-preflight-input textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid #bcd3f7;
  border-radius: 8px;
  padding: 14px 16px;
  outline: none;
  background: #fff;
  color: #25354c;
  font: inherit;
  font-size: 13px;
  line-height: 1.7;
}

.task-preflight-input textarea:focus {
  border-color: #5c91ff;
  box-shadow: 0 0 0 3px rgba(47, 115, 255, 0.1);
}

.task-preflight-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-top: 1px solid #dbe6f7;
  background: #fff;
}

.execution-task-input-ready {
  color: #0b8f62 !important;
  font-size: 10px !important;
  font-weight: 850;
}

.task-result-modal {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(940px, 96vw);
  max-height: min(880px, 92vh);
  overflow: hidden;
  border: 1px solid #cbdcf8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 36px 96px rgba(15, 23, 42, 0.3);
  animation: agentDetailSpringIn 0.34s cubic-bezier(0.18, 0.9, 0.28, 1.12) both;
}

.task-result-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid #d9e5f8;
  border-radius: 8px;
  background: #fff;
  color: #5f6f87;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

.task-result-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding: 26px 68px 22px 30px;
  border-bottom: 1px solid #dbe6f7;
  background: #f7faff;
}

.task-result-head > div:first-child > span {
  color: #2f73ff;
  font-size: 12px;
  font-weight: 900;
}

.task-result-head h2 {
  margin: 5px 0;
  color: #172033;
  font-size: 26px;
  line-height: 1.3;
}

.task-result-head p {
  margin: 0;
  color: #6d7c93;
  font-size: 12px;
}

.task-result-state {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 4px;
}

.task-result-state strong {
  color: #0c9b65;
  font-size: 14px;
}

.task-result-state span {
  color: #8290a4;
  font-size: 11px;
}

.task-result-content {
  overflow: auto;
  padding: 28px 34px 40px;
  background: #fff;
}

.task-result-content .rich-ai-reply {
  max-width: 780px;
  margin: 0 auto;
  color: #2d3d55;
}

.task-result-media {
  display: grid;
  gap: 9px;
  margin: 0 0 18px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
}

.task-result-media img,
.task-result-media video {
  width: 100%;
  max-height: min(54vh, 560px);
  border-radius: 6px;
  background: #0f172a;
  object-fit: contain;
}

.task-result-media figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-result-media figcaption span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
}

.task-result-media figcaption strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-result-version-picker {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  max-width: 780px;
  margin: 0 auto 18px;
}

.task-result-version-picker span {
  color: #718099;
  font-size: 11px;
  font-weight: 750;
}

.task-result-version-picker select {
  min-width: 190px;
  border: 1px solid #cbdcf8;
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
  color: #34445c;
  font-size: 11px;
}

.task-version-comparison {
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  padding: 12px;
  background: #f7faff;
}

.task-result-lifecycle,
.task-result-context {
  max-width: 780px;
  margin: 0 auto 16px;
}

.task-result-lifecycle {
  display: grid;
  gap: 10px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.9)),
    #fff;
}

.task-result-lifecycle header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.task-result-lifecycle header strong {
  color: #172033;
  font-size: 13px;
  font-weight: 950;
}

.task-result-lifecycle header span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 900;
}

.task-result-lifecycle > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.task-result-lifecycle article {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border: 1px solid #d8e6ff;
  border-radius: 7px;
  padding: 8px;
  background: #fff;
}

.task-result-lifecycle article i {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #eef5ff;
  color: #7b8aa1;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.task-result-lifecycle article span {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-result-lifecycle article.done i {
  background: #e8fff4;
  color: #0ca66b;
}

.task-result-lifecycle article.active {
  border-color: #9fc4ff;
  background: #f2f7ff;
}

.task-result-lifecycle article.active i {
  background: linear-gradient(135deg, #2f73ff, #21b9ff);
  color: #fff;
}

.task-result-lifecycle article.locked {
  opacity: 0.62;
}

.task-result-context {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.task-result-context article {
  display: grid;
  gap: 3px;
  border: 1px solid #dbe6f7;
  border-radius: 7px;
  padding: 10px;
  background: #fff;
}

.task-result-context span {
  color: #718099;
  font-size: 10px;
  font-weight: 850;
}

.task-result-context strong {
  overflow: hidden;
  color: #172033;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-result-handoff {
  display: grid;
  gap: 5px;
  max-width: 780px;
  margin: 0 auto 16px;
  border: 1px solid #dbe8f8;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.task-result-handoff span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 950;
}

.task-result-handoff strong {
  color: #24344b;
  font-size: 12px;
  line-height: 1.5;
}

.task-review-note,
.task-review-history {
  display: grid;
  gap: 7px;
  max-width: 780px;
  margin: 0 auto 16px;
  border: 1px solid #ddd1ff;
  border-radius: 8px;
  padding: 12px;
  background: #fbfaff;
}

.task-review-note > span,
.task-review-history > span {
  color: #7542d4;
  font-size: 10px;
  font-weight: 950;
}

.task-review-note textarea {
  min-height: 78px;
  resize: vertical;
  border: 1px solid #cfc0f8;
  border-radius: 6px;
  padding: 9px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 12px;
  line-height: 1.6;
}

.task-review-history strong {
  color: #3f2c78;
  font-size: 13px;
}

.task-review-history p {
  margin: 0;
  color: #56677f;
  font-size: 12px;
  line-height: 1.6;
}

.task-version-comparison header,
.task-version-comparison > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.task-version-comparison header strong {
  color: var(--ink);
  font-size: 13px;
}

.task-version-comparison header span,
.task-version-comparison article span,
.task-version-comparison small {
  color: #64748b;
  font-size: 11px;
}

.task-version-comparison article {
  min-width: 0;
  flex: 1;
  border: 1px solid #dbe6f7;
  border-radius: 7px;
  padding: 9px;
  background: #fff;
}

.task-version-comparison article p {
  margin: 6px 0 0;
  color: #42526a;
  font-size: 11px;
  line-height: 1.6;
}

.task-attempt-history {
  margin-top: 16px;
  border: 1px solid #dbe6f7;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.task-attempt-history summary {
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.task-attempt-history > div {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.task-attempt-history article {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-top: 1px solid #edf2f8;
  padding-top: 7px;
}

.task-attempt-history article span,
.task-attempt-history article small {
  color: #64748b;
  font-size: 10px;
}

.task-attempt-history article strong {
  color: #42526a;
  font-size: 11px;
}

.task-execution-log {
  max-width: 780px;
  margin: 28px auto 0;
  border-top: 1px solid #e3eaf5;
  padding-top: 16px;
}

.task-execution-log summary {
  color: #52647d;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.task-execution-log > div {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.task-execution-log p {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 8px 10px;
  background: #f7f9fc;
  color: #40516a;
  font-size: 10px;
}

.task-execution-log p span {
  color: #8290a4;
  font-weight: 500;
}

.task-result-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 15px 28px;
  border-top: 1px solid #dbe6f7;
  background: #fff;
}

.task-result-actions > span {
  color: #718099;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .task-result-lifecycle > div,
  .task-result-context,
  .execution-review-hub,
  .execution-review-hub .execution-history-summary {
    grid-template-columns: 1fr;
  }

  .execution-org-brief {
    grid-template-columns: 1fr;
  }

  .execution-package-tree > header {
    flex-direction: column;
  }

  .execution-package-tree article {
    grid-template-columns: 64px minmax(0, 1fr) 26px;
  }

  .execution-task footer {
    align-items: stretch;
    flex-direction: column;
  }

  .execution-task-actions button {
    width: 100%;
  }

  .execution-subtask-row {
    grid-template-columns: 62px minmax(0, 1fr) 28px;
  }

  .execution-subtask-row select {
    grid-column: 2 / 4;
  }

  .execution-subtask-batch {
    grid-template-columns: 1fr;
  }

  .execution-contract-row {
    grid-template-columns: minmax(0, 1fr) 94px 28px;
  }

  .execution-contract-row > :nth-child(3),
  .execution-contract-row > :nth-child(4) {
    grid-column: span 1;
  }

  .execution-contract-row > button {
    grid-column: 3;
    grid-row: 1;
  }

  .task-result-overlay {
    align-items: end;
    padding: 0;
  }

  .task-preflight-overlay {
    align-items: end;
    padding: 0;
  }

  .task-preflight-modal {
    width: 100%;
    max-height: 94vh;
    border-radius: 12px 12px 0 0;
  }

  .task-preflight-head,
  .task-preflight-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .task-preflight-summary,
  .task-preflight-checklist,
  .task-preflight-context {
    grid-template-columns: 1fr;
  }

  .task-preflight-section-title {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  .task-preflight-actions {
    grid-template-columns: 1fr 1fr;
    padding: 14px 18px;
  }

  .task-preflight-actions > span {
    grid-column: 1 / -1;
  }

  .task-result-modal {
    width: 100%;
    max-height: 94vh;
    border-radius: 12px 12px 0 0;
  }

  .task-result-head {
    grid-template-columns: 1fr;
    padding: 22px 58px 18px 20px;
  }

  .task-result-state {
    justify-items: start;
  }

  .task-result-content {
    padding: 22px 20px 32px;
  }

  .task-result-actions {
    grid-template-columns: 1fr 1fr;
    padding: 14px 18px;
  }

  .task-result-actions > span {
    grid-column: 1 / -1;
  }

  .task-version-comparison > div {
    flex-direction: column;
  }

  .task-attempt-history article {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

.execution-org-node {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}

.execution-org-node.leader {
  border-color: #9fc4ff;
  background: #f8fbff;
}

.execution-org-avatar.role-avatar-wrap {
  width: 42px;
  height: 42px;
}

.execution-asset-list article,
.execution-empty {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.execution-asset-open {
  justify-self: start;
  margin-top: 4px;
  border: 1px solid #bcd3ff;
  border-radius: 6px;
  padding: 6px 10px;
  background: #fff;
  color: #2f73ff;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.execution-delivery-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(104px, 136px)) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  background: #f8fbff;
}

.execution-delivery-summary div {
  display: grid;
  gap: 3px;
}

.execution-delivery-summary span {
  color: #74849a;
  font-size: 10px;
  font-weight: 750;
}

.execution-delivery-summary strong {
  color: #1f3048;
  font-size: 22px;
  font-weight: 900;
}

.execution-delivery-summary p {
  margin: 0;
  color: #56677f;
  font-size: 12px;
  line-height: 1.6;
}

.execution-asset-hub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 14px;
  margin-bottom: 14px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.9)),
    #fff;
}

.execution-asset-hub-copy {
  display: grid;
  align-content: center;
  gap: 6px;
}

.execution-asset-hub-copy span,
.execution-asset-section > header span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.execution-asset-hub-copy strong {
  color: #172033;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.18;
}

.execution-asset-hub-copy p {
  max-width: 720px;
  margin: 0;
  color: #60718a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.7;
}

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

.execution-asset-hub-metrics article {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 64px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.88);
}

.execution-asset-hub-metrics span {
  color: #718099;
  font-size: 10px;
  font-weight: 850;
}

.execution-asset-hub-metrics strong {
  color: #172033;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

.execution-final-delivery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid #abdcca;
  border-radius: 8px;
  padding: 15px 16px;
  background: #f4fcf8;
}

.execution-final-delivery > div:first-child {
  display: grid;
  gap: 5px;
}

.execution-final-delivery > div:first-child span {
  color: #07865c;
  font-size: 10px;
  font-weight: 950;
}

.execution-final-delivery > div:first-child strong {
  color: #173d31;
  font-size: 18px;
}

.execution-final-delivery > div:first-child p {
  margin: 0;
  color: #557267;
  font-size: 12px;
}

.execution-final-delivery-metrics {
  display: flex;
  gap: 8px;
}

.execution-final-delivery-metrics article {
  display: grid;
  gap: 3px;
  min-width: 92px;
  border-left: 1px solid #c7e6da;
  padding-left: 11px;
}

.execution-final-delivery-metrics strong {
  color: #173d31;
  font-size: 14px;
}

.execution-final-delivery-metrics span {
  color: #688279;
  font-size: 10px;
}

.execution-final-delivery footer {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #d8eee6;
  padding-top: 11px;
}

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

.execution-asset-section {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  border: 1px solid #dbe7f8;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.execution-package-tree {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
}

.execution-package-tree > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.execution-package-tree header div {
  display: grid;
  gap: 4px;
}

.execution-package-tree header span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 950;
}

.execution-package-tree header strong {
  color: #172033;
  font-size: 18px;
}

.execution-package-tree header p {
  max-width: 560px;
  margin: 0;
  color: #61728a;
  font-size: 12px;
  line-height: 1.6;
}

.execution-package-tree > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.execution-package-tree article {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 9px;
  border: 1px solid #dbe7f8;
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}

.execution-package-tree article i {
  border-radius: 7px;
  padding: 6px 7px;
  background: #edf5ff;
  color: #2f73ff;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  text-align: center;
}

.execution-package-tree article div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.execution-package-tree article strong {
  overflow: hidden;
  color: #26364d;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.execution-package-tree article span {
  overflow: hidden;
  color: #728199;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.execution-package-tree article em {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #f1f6ff;
  color: #2f73ff;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.execution-asset-section.wide {
  grid-column: 1 / -1;
}

.execution-asset-section > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf2f8;
  padding-bottom: 8px;
}

.execution-asset-section > header strong {
  color: #172033;
  font-size: 14px;
  font-weight: 950;
}

.execution-delivery-list {
  gap: 10px;
}

.execution-delivery-card {
  display: grid;
  gap: 9px;
  align-content: start;
}

.execution-delivery-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.execution-delivery-card header div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.execution-delivery-card header span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 850;
}

.execution-delivery-card header strong {
  overflow-wrap: anywhere;
}

.execution-delivery-card header em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  background: #eef5ff;
  color: #2f73ff;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.execution-delivery-card p {
  margin: 0;
  color: #56677f;
  font-size: 12px;
  line-height: 1.6;
}

.execution-delivery-card footer {
  display: grid;
  grid-template-columns: minmax(90px, max-content) minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
}

.execution-delivery-card footer span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.execution-delivery-card footer small {
  overflow: hidden;
  color: #74849a;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.execution-delivery-preview {
  overflow: hidden;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  background: #eef5ff;
  aspect-ratio: 16 / 9;
}

.execution-delivery-preview img,
.execution-delivery-preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.execution-history-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}

.execution-review-hub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) auto;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 14px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.9)),
    #fff;
}

.execution-review-copy {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
}

.execution-review-copy span,
.execution-review-state span {
  color: #2f73ff;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.execution-review-copy strong {
  color: #172033;
  font-size: 21px;
  font-weight: 950;
  line-height: 1.18;
}

.execution-review-copy p {
  max-width: 720px;
  margin: 0;
  color: #60718a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.65;
}

.execution-review-state {
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.execution-review-state.warn {
  border-color: #ffd2ca;
  background: #fff7f5;
}

.execution-review-state strong {
  color: #172033;
  font-size: 16px;
  font-weight: 950;
}

.execution-review-state em {
  color: #718099;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.execution-review-hub .execution-history-summary {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.execution-review-hub > .create-button {
  align-self: center;
  min-width: 132px;
}

.execution-history-summary div,
.execution-history-section,
.execution-history-deliverables article,
.execution-history-log-list article,
.execution-history-task-list article,
.execution-failure-list article {
  border: 1px solid #dbe7f8;
  border-radius: 8px;
  background: #fff;
}

.execution-history-summary div {
  padding: 12px;
}

.execution-history-summary span,
.execution-history-section header span,
.execution-history-deliverables span,
.execution-history-deliverables small,
.execution-history-log-list span,
.execution-history-task-list span,
.execution-failure-list span {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.execution-history-summary strong {
  display: block;
  margin-top: 4px;
  color: #172033;
  font-size: 20px;
}

.execution-history-section {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
}

.execution-history-section header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.execution-history-section header strong {
  color: #172033;
  font-size: 14px;
}

.execution-failure-list,
.execution-history-task-list,
.execution-history-deliverables,
.execution-history-log-list {
  display: grid;
  gap: 8px;
}

.execution-history-task-list article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}

.execution-history-task-list i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #eef5ff;
  color: #2f73ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.execution-history-task-list article.failed i {
  background: #fff1f0;
  color: #d92d20;
}

.execution-failure-list article,
.execution-history-deliverables article,
.execution-history-log-list article {
  display: grid;
  gap: 5px;
  padding: 10px;
}

.execution-failure-list article {
  border-color: #f4b7b2;
  background: #fffafa;
}

.execution-failure-list article > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.execution-failure-list p,
.execution-history-task-list p,
.execution-history-log-list p {
  margin: 0;
  color: #536276;
  font-size: 12px;
  line-height: 1.55;
}

.execution-failure-list em,
.execution-history-task-list em {
  color: #2f73ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.execution-empty.compact {
  padding: 12px;
}

@media (max-width: 700px) {
  .execution-asset-hub,
  .execution-asset-board {
    grid-template-columns: 1fr;
  }

  .execution-asset-hub-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .execution-final-delivery {
    grid-template-columns: 1fr;
  }

  .execution-final-delivery-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .execution-final-delivery footer {
    flex-direction: column;
  }

  .execution-delivery-summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .execution-delivery-summary p {
    grid-column: 1 / -1;
  }

  .execution-delivery-card header,
  .execution-delivery-card footer {
    grid-template-columns: 1fr;
  }

  .execution-delivery-card footer small {
    white-space: normal;
  }
}

.execution-media-summary {
  display: grid;
  grid-template-columns: 140px 140px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  background: #f8fbff;
}

.execution-media-summary div {
  display: grid;
  gap: 3px;
}

.execution-media-summary span {
  color: #74849a;
  font-size: 10px;
  font-weight: 750;
}

.execution-media-summary strong {
  color: #1f3048;
  font-size: 22px;
}

.execution-media-summary p {
  margin: 0;
  color: #66768d;
  font-size: 11px;
  line-height: 1.55;
}

.execution-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.execution-media-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  background: #fff;
}

.execution-media-preview {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  min-height: 150px;
  background: #eaf3ff;
  color: #2f73ff;
}

.execution-media-preview.video {
  background: #edf2f7;
  color: #43546c;
}

.execution-media-preview > span {
  font-size: 22px;
  font-weight: 950;
}

.execution-media-preview > small {
  font-size: 9px;
  font-weight: 750;
}

.execution-media-preview img,
.execution-media-preview video {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
}

.execution-media-copy {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 14px;
}

.execution-media-copy header,
.execution-media-copy footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.execution-media-copy header span {
  color: #60728b;
  font-size: 10px;
  font-weight: 800;
}

.execution-media-copy header em {
  color: #b54708;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}

.execution-media-card.ready .execution-media-copy header em,
.execution-media-card.generated .execution-media-copy header em {
  color: #07875c;
}

.execution-media-copy > strong {
  color: #24334a;
  font-size: 14px;
  line-height: 1.4;
}

.execution-media-copy > p {
  margin: 0;
  color: #738299;
  font-size: 10px;
  line-height: 1.5;
}

.execution-media-copy footer {
  align-self: end;
  justify-content: flex-start;
  margin-top: 4px;
}

.execution-media-copy footer button {
  border: 1px solid #bcd3ff;
  border-radius: 6px;
  padding: 6px 9px;
  background: #fff;
  color: #2f73ff;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

@media (max-width: 700px) {
  .execution-media-summary {
    grid-template-columns: 1fr 1fr;
  }

  .execution-media-summary p {
    grid-column: 1 / -1;
  }

  .execution-media-grid {
    grid-template-columns: 1fr;
  }

  .execution-media-card {
    grid-template-columns: 108px minmax(0, 1fr);
  }
}

.execution-empty {
  min-height: 120px;
  place-items: center;
  text-align: center;
}

.group-chat-tools label {
  min-width: 0;
  height: 34px;
  border-color: #d8e6ff;
  border-radius: 50%;
  color: #5f6b7a;
}

.group-attachments:empty {
  display: none;
}

.group-attachment-chip {
  max-width: 260px;
  border: 1px solid #cfe0ff;
  background: #f4f8ff;
}

.group-attachment-chip strong {
  overflow: hidden;
  max-width: 120px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-attachment-chip small {
  color: #6b7b93;
  font-size: 11px;
  font-weight: 800;
}

.chat-history-panel {
  padding: 16px;
}

.chat-session-list {
  display: grid;
  gap: 9px;
}

.chat-session {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px;
  background: #fff;
  color: #374151;
}

.chat-session-main {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

:is(.chat-session, .all-agent-recent-item) .conversation-status-indicator {
  box-sizing: border-box;
  display: block;
  width: 8px;
  height: 8px;
  justify-self: center;
  border: 1px solid #c7d0dd;
  border-radius: 50%;
  background: transparent;
}

:is(.chat-session, .all-agent-recent-item) .conversation-status-indicator.is-running {
  width: 11px;
  height: 11px;
  border: 2px solid #c7d0dd;
  border-top-color: #2f73ff;
  animation: chatConversationRunning 0.82s linear infinite;
}

:is(.chat-session, .all-agent-recent-item) .conversation-status-indicator.is-completed-unread {
  border-color: #16a765;
  background: #20bf71;
  box-shadow: 0 1px 6px rgba(32, 191, 113, 0.46);
}

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

@media (prefers-reduced-motion: reduce) {
  :is(.chat-session, .all-agent-recent-item) .conversation-status-indicator.is-running {
    animation: none;
    border-color: #2f73ff;
    background: #fff;
  }
}

.chat-session-main {
  overflow: hidden;
  border: 0;
  padding: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.chat-session.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.chat-session strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

.chat-session-more {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #7b8798;
  cursor: pointer;
  opacity: 0;
}

.chat-session:hover .chat-session-more,
.chat-session-menu.show + .chat-session-more {
  opacity: 1;
}

.chat-session-menu {
  position: absolute;
  top: 34px;
  right: 6px;
  z-index: 8;
  display: none;
  min-width: 104px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(37, 71, 123, 0.16);
}

.chat-session-menu.show {
  display: grid;
}

.chat-session-menu button {
  border: 0;
  border-radius: 6px;
  padding: 7px 9px;
  background: transparent;
  color: #374151;
  text-align: left;
}

.chat-session-menu button:hover {
  background: #eef4ff;
}

.chat-session-menu button.danger {
  color: #e54863;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  margin: 16px 0 20px;
}

.asset-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

.asset-overview article {
  display: grid;
  gap: 5px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 13px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(47, 115, 255, 0.07);
}

.asset-overview span {
  color: #2f73ff;
  font-size: 11px;
  font-weight: 850;
}

.asset-overview strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 850;
  line-height: 1.1;
}

.asset-overview em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  line-height: 1.45;
}

.knowledge-side-panel,
.knowledge-editor {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.knowledge-side-panel::before,
.knowledge-editor::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 5px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(90deg, #7c3cff, #2f73ff, #23c6e8);
}

.knowledge-side-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.knowledge-side-panel > div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.knowledge-side-panel span,
.knowledge-editor-head span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.knowledge-side-panel strong,
.knowledge-editor-head strong {
  display: block;
  margin-top: 5px;
  color: #172033;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

.knowledge-side-panel p,
.knowledge-file-picker em {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.65;
}

.knowledge-side-panel label {
  display: grid;
  gap: 7px;
}

.knowledge-side-panel small {
  color: #374151;
  font-size: 11px;
  font-weight: 500;
}

.knowledge-side-panel input,
.knowledge-side-panel select,
.rich-editor {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: #172033;
  font-size: 12px;
  font-weight: 400;
  outline: none;
}

.knowledge-side-panel input:focus,
.knowledge-side-panel select:focus,
.rich-editor:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 115, 255, 0.12);
}

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

.knowledge-editor-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.knowledge-editor-actions .create-button {
  height: 34px;
  padding: 0 14px;
  font-size: 12px;
}

.knowledge-editor-head small {
  border-radius: 999px;
  padding: 7px 11px;
  background: #f4f8ff;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.knowledge-editor-head small.saved {
  background: #e8fff4;
  color: #0ca66b;
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
  background: #f8fbff;
}

.rich-toolbar span {
  width: 1px;
  min-height: 28px;
  background: #dce7f8;
}

.rich-toolbar button {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 11px;
  background: #fff;
  color: #374151;
  font-size: 11px;
  font-weight: 500;
  transition:
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.rich-toolbar button:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: 0 8px 18px rgba(47, 115, 255, 0.1);
  transform: translateY(-1px);
}

.rich-editor {
  min-height: 360px;
  border: 0;
  border-radius: 0;
  padding: 22px 24px 28px;
  background:
    linear-gradient(rgba(47, 115, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 115, 255, 0.035) 1px, transparent 1px),
    #fff;
  background-size: 32px 32px;
  box-shadow: none;
  line-height: 1.8;
  outline: none;
  font-weight: 400;
}

.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #9aa4b2;
}

.rich-editor h2,
.rich-editor h3 {
  margin: 16px 0 8px;
  color: var(--text);
  line-height: 1.35;
}

.rich-editor h2 {
  font-size: 22px;
}

.rich-editor h3 {
  font-size: 18px;
}

.rich-editor p,
.rich-editor ul,
.rich-editor ol,
.rich-editor blockquote {
  margin: 10px 0;
}

.rich-editor blockquote {
  border-left: 4px solid #2f73ff;
  border-radius: 6px;
  padding: 10px 14px;
  background: rgba(47, 115, 255, 0.07);
  color: #4f6077;
}

.rich-editor hr {
  height: 1px;
  border: 0;
  margin: 18px 0;
  background: linear-gradient(90deg, transparent, #bcd4ff, transparent);
}

.knowledge-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.knowledge-card {
  display: grid;
  min-height: 214px;
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(37, 71, 123, 0.07);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.knowledge-card:hover {
  border-color: #9fc4ff;
  box-shadow: 0 18px 42px rgba(37, 71, 123, 0.12);
  transform: translateY(-2px);
}

.knowledge-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.knowledge-type-badge {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #edf5ff;
  color: #2f73ff;
  font-size: 11px;
  font-weight: 1000;
}

.knowledge-card-pdf .knowledge-type-badge {
  background: #fff0f0;
  color: #d92d20;
}

.knowledge-card-sheet .knowledge-type-badge {
  background: #eafff5;
  color: #079455;
}

.knowledge-card-slide .knowledge-type-badge {
  background: #fff1f2;
  color: #d92d3f;
}

.knowledge-card-team .knowledge-type-badge,
.knowledge-card-brief .knowledge-type-badge {
  background: #eef5ff;
  color: #2f73ff;
}

.knowledge-card-single .knowledge-type-badge {
  background: #f0fdf4;
  color: #0ca66b;
}

.knowledge-card-profile .knowledge-type-badge {
  background: #f8f2ff;
  color: #7c3cff;
}

.knowledge-card-media .knowledge-type-badge {
  background: #eef2ff;
  color: #5266d8;
  font-size: 8px;
}

.knowledge-card-title {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.knowledge-card-title strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-card-title em {
  color: #6b7b93;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.knowledge-card-content {
  display: -webkit-box;
  overflow: hidden;
  min-height: 60px;
  margin: 14px 0;
  color: #56677f;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.knowledge-card-meta {
  display: grid;
  gap: 5px;
  align-self: end;
  min-width: 0;
  border-top: 1px solid #edf3ff;
  padding-top: 11px;
}

.knowledge-card-meta span {
  overflow: hidden;
  color: #7a8798;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-card-meta .knowledge-card-origin i {
  padding: 0 2px;
  color: #a2adbb;
  font-style: normal;
}

.knowledge-card-actions button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 500;
}

.knowledge-card-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.knowledge-empty {
  grid-column: 1 / -1;
}

.knowledge-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(37, 71, 123, 0.07);
}

.knowledge-row strong,
.knowledge-row span,
.knowledge-row p {
  display: block;
}

.knowledge-row span,
.knowledge-row p {
  color: var(--muted);
}

.knowledge-content {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.knowledge-content h3,
.knowledge-content p,
.knowledge-content ul {
  margin: 8px 0 0;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.row-actions button {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #374151;
}

.model-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
}

.model-route-note {
  margin-top: -4px;
  color: #6b7a90;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}

.model-route-disabled {
  opacity: 0.58;
}

.model-route-disabled select {
  cursor: not-allowed;
}

.admin-dashboard-page {
  background:
    linear-gradient(rgba(47, 115, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 115, 255, 0.035) 1px, transparent 1px),
    #f8fbff;
  background-size: 34px 34px;
}

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

.admin-metric-grid article {
  position: relative;
  overflow: hidden;
  border: 1px solid #d7e5ff;
  border-radius: 8px;
  padding: 18px;
  background:
    radial-gradient(circle at 90% 12%, rgba(34, 211, 238, 0.18), transparent 28%),
    #fff;
  box-shadow: 0 16px 38px rgba(37, 71, 123, 0.08);
}

.admin-metric-grid article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #2f73ff, #22d3ee);
}

.admin-metric-grid span,
.admin-metric-grid em {
  display: block;
  color: #6b7a90;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.admin-metric-grid strong {
  display: block;
  margin: 8px 0 6px;
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
}

.admin-control-grid,
.wechat-admin-grid,
.admin-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
  margin-top: 16px;
}

.admin-template-ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.admin-template-ops-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-template-ops-head span,
.admin-template-ops-head p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.admin-template-ops-head h2 {
  margin: 4px 0;
  color: #172033;
  font-size: 22px;
}

.admin-template-ops-head > strong {
  border: 1px solid #d8e6ff;
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  color: #2f73ff;
  font-size: 12px;
}

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

.admin-template-card {
  cursor: default;
}

.template-ops-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.template-ops-card-stats span {
  border-radius: 7px;
  padding: 5px 8px;
  background: #f3f7ff;
  color: #536276;
  font-size: 11px;
  font-weight: 850;
}

.template-ops-checks em {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #536276;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

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

.template-ops-stats article {
  border: 1px solid #dce7f6;
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
}

.template-ops-stats span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.template-ops-stats strong {
  display: block;
  margin-top: 4px;
  color: #172033;
  font-size: 18px;
}

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

.admin-template-monitor article {
  border: 1px solid #dbe7f8;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.admin-template-monitor span,
.admin-template-monitor em {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.admin-template-monitor strong {
  display: block;
  margin: 6px 0 4px;
  color: #172033;
  font-size: 24px;
}

.wechat-admin-control {
  display: grid;
  gap: 16px;
}

.wechat-admin-overview,
.wechat-admin-panel {
  border: 1px solid #dfe8f6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(37, 71, 123, 0.06);
}

.wechat-admin-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.85fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  background:
    linear-gradient(rgba(47, 115, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 115, 255, 0.035) 1px, transparent 1px),
    linear-gradient(135deg, #fff, #f5faff);
  background-size: 28px 28px, 28px 28px, auto;
}

.wechat-admin-overview span,
.wechat-admin-panel-head span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.wechat-admin-overview h2,
.wechat-admin-panel-head h2 {
  margin: 4px 0 0;
  color: #172033;
  font-size: 20px;
  line-height: 1.3;
}

.wechat-admin-overview p {
  max-width: 760px;
  margin: 10px 0 0;
  color: #66758c;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
}

.wechat-admin-tutorial {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(340px, 1.2fr) auto;
  gap: 18px;
  align-items: end;
  border: 1px solid #d9e6fb;
  border-radius: 8px;
  padding: 16px 18px;
  background: #f7faff;
}

.wechat-admin-tutorial-copy > span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.wechat-admin-tutorial-copy h2 {
  margin: 4px 0 6px;
  color: #172033;
  font-size: 18px;
  line-height: 1.3;
}

.wechat-admin-tutorial-copy p {
  max-width: 620px;
  margin: 0;
  color: #66758c;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
}

.wechat-admin-tutorial label {
  display: grid;
  gap: 7px;
  color: #485a73;
  font-size: 12px;
  font-weight: 700;
}

.wechat-admin-tutorial input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cad9ee;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #172033;
  font: inherit;
}

.wechat-admin-tutorial input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(47, 115, 255, 0.14);
}

.wechat-admin-tutorial small {
  color: #76869c;
  font-size: 11px;
  font-weight: 400;
}

.wechat-admin-tutorial-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.wechat-admin-tutorial-actions .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

.wechat-provider-card,
.wechat-provider-admin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  margin-bottom: 18px;
  border: 1px solid #cfe0ff;
  border-radius: 18px;
  background: linear-gradient(135deg, #f5f9ff 0%, #eef8ff 100%);
}
.wechat-provider-card h2,
.wechat-provider-admin h2 { margin: 4px 0 6px; }
.wechat-provider-card p,
.wechat-provider-admin p { margin: 0; color: var(--muted); }
.wechat-provider-card > div > span,
.wechat-provider-admin span { color: #2674e8; font-size: 12px; letter-spacing: .08em; }
.wechat-provider-status { color: var(--muted); font-size: 14px; }
.wechat-provider-status.active { color: #07835b; }
.wechat-provider-admin { grid-template-columns: minmax(220px, .8fr) minmax(0, 1.6fr); align-items: start; }
.wechat-provider-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wechat-provider-admin-grid label { display: grid; gap: 6px; }
.wechat-provider-admin-grid input,
.wechat-provider-admin-grid select { width: 100%; }
.wechat-provider-callbacks { grid-column: 1 / -1; display: grid; gap: 8px; }
.wechat-provider-callbacks div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; }
.wechat-provider-callbacks code { overflow-wrap: anywhere; }
.wechat-provider-authorizations { grid-column: 1 / -1; display: grid; gap: 8px; }
.wechat-provider-authorization-row { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(180px, 1.2fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.wechat-provider-authorization-row strong { font-size: 14px; }
.wechat-provider-authorization-row span { color: var(--muted); font-size: 13px; letter-spacing: 0; }
.wechat-provider-authorization-row em { font-style: normal; color: #07835b; white-space: nowrap; }
.wechat-provider-authorization-row.revoked em { color: #bf3a3a; }

@media (max-width: 700px) {
  .wechat-provider-card,
  .wechat-provider-admin { grid-template-columns: 1fr; padding: 16px; }
  .wechat-provider-admin-grid { grid-template-columns: 1fr; }
  .wechat-provider-callbacks { grid-column: auto; }
  .wechat-provider-callbacks div { grid-template-columns: 1fr; }
  .wechat-provider-authorizations { grid-column: auto; }
  .wechat-provider-authorization-row { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .wechat-admin-tutorial {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .wechat-admin-tutorial-actions {
    justify-content: flex-start;
  }
}

.wechat-admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.wechat-admin-metrics article {
  border: 1px solid #d9e6fb;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.wechat-admin-metrics span,
.wechat-admin-metrics em {
  display: block;
  overflow: hidden;
  color: #65758c;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-admin-metrics strong {
  display: block;
  margin: 5px 0 2px;
  color: #172033;
  font-size: 24px;
  line-height: 1.1;
}

.wechat-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
}

.wechat-admin-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.wechat-admin-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.wechat-admin-panel-head em {
  color: #71819a;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.5;
  text-align: right;
}

.wechat-admin-tenant-list,
.wechat-admin-event-list {
  display: grid;
  gap: 10px;
}

.wechat-admin-tenant-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(130px, 0.95fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e1eaf7;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.wechat-admin-tenant-row strong,
.wechat-admin-tenant-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-admin-tenant-row strong {
  color: #172033;
  font-size: 13px;
  font-weight: 650;
}

.wechat-admin-tenant-row span {
  color: #73839a;
  font-size: 12px;
  font-weight: 400;
}

.wechat-admin-tenant-row em {
  justify-self: end;
  min-width: 64px;
  border: 1px solid #dbe7f8;
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
  color: #73839a;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  text-align: center;
}

.wechat-admin-tenant-row em.enabled {
  border-color: #bdeedb;
  background: #f0fff7;
  color: #09865a;
}

.wechat-admin-tenant-row em.pending {
  border-color: #d8e6ff;
  background: #f2f7ff;
  color: var(--blue);
}

.wechat-admin-callback {
  display: grid;
  gap: 8px;
  border: 1px solid #dbe7f8;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.wechat-admin-callback span,
.wechat-admin-event-list h3 {
  margin: 0;
  color: #60708a;
  font-size: 12px;
  font-weight: 600;
}

.wechat-admin-callback code {
  overflow: hidden;
  border: 1px solid #d4e2f5;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-admin-callback p,
.wechat-admin-event-list p,
.wechat-admin-empty {
  margin: 0;
  color: #71819a;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.65;
}

.wechat-admin-event-list article,
.wechat-admin-empty {
  border: 1px solid #e2eaf6;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
}

.wechat-admin-event-list strong,
.wechat-admin-event-list span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-admin-event-list strong {
  color: #172033;
  font-size: 13px;
  font-weight: 650;
}

.wechat-admin-event-list span {
  color: #7b8aa0;
  font-size: 12px;
  font-weight: 400;
}

@media (max-width: 860px) {
  .agent-detail-modal {
    width: min(96vw, 620px);
    max-height: 86vh;
  }

  .agent-detail-hero {
    grid-template-columns: 76px minmax(0, 1fr);
    padding-right: 52px;
  }

  .agent-detail-compensation {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .agent-detail-pay-badge {
    flex: 1 1 auto;
  }

  .agent-detail-body {
    grid-template-columns: 1fr;
  }

  .agent-detail-workflow {
    grid-template-columns: 1fr;
  }

  .agent-detail-price-card {
    grid-column: 1 / -1;
  }

  .agent-detail-employment {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-avatar-crop-body {
    grid-template-columns: 1fr;
  }

  .account-avatar-crop-stage {
    min-height: 300px;
  }

  .account-avatar-crop-side {
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
  }

  .account-avatar-crop-move {
    grid-column: 1 / -1;
  }
}

/* Front template: Starnest Bento */
[data-front-template="starnest-bento"]:not(.admin-console-mode) {
  --bento-bg: #f4f7fb;
  --bento-surface: rgba(255, 255, 255, 0.84);
  --bento-surface-strong: #ffffff;
  --bento-ink: #101828;
  --bento-muted: #667085;
  --bento-line: rgba(16, 24, 40, 0.1);
  --bento-accent: #2563eb;
  --bento-accent-soft: #dbeafe;
  --bento-green: #1f9d77;
  background: var(--bento-bg);
}

[data-front-template="starnest-bento"]:not(.admin-console-mode) {
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 0;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 34%),
    linear-gradient(180deg, #f9fbff 0%, #eef3f9 100%);
}

[data-front-template="starnest-bento"]:not(.admin-console-mode) .sidebar {
  top: 16px;
  height: calc(100vh - 32px);
  margin: 16px 0 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 251, 255, 0.72)),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 28px 80px rgba(68, 90, 124, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

[data-front-template="starnest-bento"]:not(.admin-console-mode) .brand {
  height: 78px;
  padding: 0 18px;
  color: #101828;
  font-size: 22px;
}

[data-front-template="starnest-bento"]:not(.admin-console-mode) .brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(145deg, #111827, #344054);
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.22);
}

[data-front-template="starnest-bento"]:not(.admin-console-mode) .side-menu {
  padding: 8px 14px 14px;
}

[data-front-template="starnest-bento"]:not(.admin-console-mode) .menu-group {
  margin: 20px 0 8px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 820;
}

[data-front-template="starnest-bento"]:not(.admin-console-mode) .menu-item {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: #475467;
  font-weight: 760;
}

[data-front-template="starnest-bento"]:not(.admin-console-mode) .menu-item:hover,
[data-front-template="starnest-bento"]:not(.admin-console-mode) .menu-item.active,
[data-front-template="starnest-bento"]:not(.admin-console-mode) .menu-item.sub-active {
  border-color: rgba(37, 99, 235, 0.14);
  background: linear-gradient(135deg, #ffffff, #eef5ff);
  color: #175cd3;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.1);
}

[data-front-template="starnest-bento"]:not(.admin-console-mode) .menu-item em,
[data-front-template="starnest-bento"]:not(.admin-console-mode) .menu-item strong {
  border-radius: 999px;
  background: #2563eb;
}

[data-front-template="starnest-bento"]:not(.admin-console-mode) .account-box {
  height: 58px;
  margin: 0 14px 14px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: #344054;
}

[data-front-template="starnest-bento"]:not(.admin-console-mode) .workspace {
  background:
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.14), transparent 30%),
    radial-gradient(circle at 86% 8%, rgba(31, 157, 119, 0.12), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
  padding: 14px 22px 26px;
}

[data-front-template="starnest-bento"]:not(.admin-console-mode) .topbar {
  top: 14px;
  height: 62px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 52px rgba(68, 90, 124, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(22px);
}

[data-front-template="starnest-bento"]:not(.admin-console-mode) .collapse-button,
[data-front-template="starnest-bento"]:not(.admin-console-mode) .consult-button,
[data-front-template="starnest-bento"]:not(.admin-console-mode) #adminPortalButton,
[data-front-template="starnest-bento"]:not(.admin-console-mode) #roleBadge {
  border-radius: 999px;
}

[data-front-template="starnest-bento"]:not(.admin-console-mode) #adminPortalButton,
[data-front-template="starnest-bento"]:not(.admin-console-mode) #roleBadge {
  background: #111827;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.16);
}

[data-front-template="starnest-bento"]:not(.admin-console-mode) .page-card:not(.admin-dashboard-page) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.front-dashboard-screen[data-front-template="starnest-bento"] {
  color: var(--bento-ink);
}

.bento-home-shell {
  display: grid;
  gap: 18px;
  padding: 0;
}

.bento-home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(380px, 1.12fr);
  gap: clamp(18px, 3vw, 34px);
  min-height: min(610px, calc(100dvh - 118px));
  padding: clamp(28px, 5vw, 72px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 38px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.76) 62%),
    linear-gradient(120deg, rgba(37, 99, 235, 0.14), transparent 48%);
  box-shadow: 0 36px 90px rgba(64, 86, 118, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.98);
  overflow: hidden;
}

.bento-home-hero::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(16, 24, 40, 0.04);
  border-radius: 30px;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(37, 99, 235, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.72;
  pointer-events: none;
}

.bento-home-copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.bento-home-copy > span,
.bento-tile > span,
.bento-tile-head span {
  color: var(--bento-accent);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.08em;
}

.bento-home-copy h2 {
  max-width: 650px;
  margin: 14px 0 16px;
  color: var(--bento-ink);
  font-size: clamp(54px, 7.2vw, 104px);
  line-height: 0.92;
  letter-spacing: 0;
}

.bento-home-copy p {
  max-width: 540px;
  margin: 0;
  color: #475467;
  font-size: 17px;
  line-height: 1.72;
}

.bento-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.bento-home-actions .create-button,
.bento-home-actions .secondary-button,
.bento-tile .create-button,
.bento-tile .secondary-button {
  min-height: 44px;
  border-radius: 999px;
  white-space: nowrap;
}

.bento-home-actions .create-button,
.bento-tile .create-button {
  background: #101828;
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(16, 24, 40, 0.18);
}

.bento-home-actions .secondary-button,
.bento-tile .secondary-button {
  border-color: rgba(16, 24, 40, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: var(--bento-ink);
}

.bento-home-visual {
  position: relative;
  z-index: 1;
  align-self: stretch;
  min-height: 430px;
  margin: 0;
  overflow: hidden;
  border: 12px solid rgba(255, 255, 255, 0.9);
  border-radius: 34px;
  background: #e8eef7;
  box-shadow: 0 34px 90px rgba(64, 86, 118, 0.22);
}

.bento-home-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bento-home-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(170px, auto);
  gap: 14px;
}

.bento-tile {
  display: grid;
  align-content: space-between;
  min-width: 0;
  min-height: 178px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 28px;
  background: var(--bento-surface);
  box-shadow: 0 20px 52px rgba(64, 86, 118, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.bento-tile-large {
  grid-column: span 3;
  grid-row: span 2;
  background:
    linear-gradient(140deg, rgba(219, 234, 254, 0.82), rgba(255, 255, 255, 0.88) 58%),
    var(--bento-surface-strong);
}

.bento-tile-wide {
  grid-column: span 3;
}

.bento-tile-image {
  position: relative;
  grid-column: span 3;
  padding: 0;
  background: #dbeafe;
}

.bento-tile-image img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  display: block;
}

.bento-tile-image::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(16, 24, 40, 0.68));
}

.bento-tile-image div {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  gap: 4px;
  color: #ffffff;
}

.bento-tile h3 {
  margin: 12px 0 10px;
  color: var(--bento-ink);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: 0;
}

.bento-tile p,
.bento-tile small,
.bento-template-strip span,
.bento-home-list small {
  color: var(--bento-muted);
  line-height: 1.58;
}

.bento-tile-metric strong,
.bento-tile-balance strong,
.bento-tile-token strong,
.bento-tile-head strong {
  color: var(--bento-ink);
  font-size: 38px;
  line-height: 1;
}

.bento-tile-metric {
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
}

.bento-tile-agent {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-home-agent-avatar.role-avatar-wrap {
  width: 76px;
  height: 76px;
  margin: 14px 0;
  border-radius: 24px;
  background: var(--bento-accent-soft);
}

.bento-tile-assets {
  grid-column: span 2;
}

.bento-tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.bento-tile-head button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--bento-line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--bento-ink);
  font-weight: 760;
}

.bento-home-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.bento-home-list button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--bento-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--bento-ink);
  text-align: left;
}

.bento-template-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.bento-template-strip button {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--bento-line);
  border-radius: 22px;
  background: #ffffff;
  color: var(--bento-ink);
  text-align: left;
}

.bento-template-strip img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
}

.bento-template-strip strong,
.bento-home-list strong {
  color: var(--bento-ink);
}

.bento-tile-balance {
  background:
    linear-gradient(145deg, rgba(31, 157, 119, 0.14), transparent 58%),
    #ffffff;
}

.bento-tile-token {
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.14), transparent 58%),
    #ffffff;
}

.bento-tile button {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.bento-tile button:hover,
.bento-home-actions button:hover {
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: no-preference) {
  .front-dashboard-screen[data-front-template="starnest-bento"] .bento-home-hero,
  .front-dashboard-screen[data-front-template="starnest-bento"] .bento-tile {
    animation: bentoHomeEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .front-dashboard-screen[data-front-template="starnest-bento"] .bento-tile:nth-child(2n) {
    animation-delay: 0.05s;
  }

  .front-dashboard-screen[data-front-template="starnest-bento"] .bento-tile:nth-child(3n) {
    animation-delay: 0.1s;
  }
}

@keyframes bentoHomeEnter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .bento-home-hero {
    grid-template-columns: 1fr;
  }

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

  .bento-tile-large,
  .bento-tile-wide,
  .bento-tile-image,
  .bento-tile-assets {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .bento-home-shell {
    padding: 0;
    gap: 12px;
  }

  .bento-home-hero,
  .bento-tile {
    border-radius: 22px;
  }

  .bento-home-hero {
    min-height: auto;
    padding: 22px;
  }

  .bento-home-copy h2 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .bento-home-visual {
    min-height: 260px;
    border-width: 6px;
    border-radius: 22px;
  }

  .bento-home-grid,
  .bento-template-strip {
    grid-template-columns: 1fr;
  }

  .bento-tile-large,
  .bento-tile-wide,
  .bento-tile-image,
  .bento-tile-assets {
    grid-column: auto;
  }
}

/* Front template: Starnest modern */
[data-front-template="starnest-modern"]:not(.admin-console-mode) {
  --modern-bg: #07100f;
  --modern-panel: rgba(12, 26, 25, 0.78);
  --modern-panel-strong: rgba(18, 43, 40, 0.92);
  --modern-line: rgba(132, 255, 221, 0.2);
  --modern-line-soft: rgba(255, 255, 255, 0.1);
  --modern-text: #ecfffb;
  --modern-muted: #8fb3aa;
  --modern-accent: #48f0c2;
  --modern-warm: #ffd166;
  --modern-danger: #ff6f91;
  background:
    linear-gradient(135deg, rgba(72, 240, 194, 0.08), transparent 28%),
    linear-gradient(180deg, #07100f 0%, #091715 42%, #0c1117 100%);
}

[data-front-template="starnest-modern"]:not(.admin-console-mode) .workspace {
  background:
    linear-gradient(rgba(132, 255, 221, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(132, 255, 221, 0.028) 1px, transparent 1px),
    var(--modern-bg);
  background-size: 52px 52px;
}

[data-front-template="starnest-modern"]:not(.admin-console-mode) .page-card:not(.admin-dashboard-page) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.front-dashboard-screen[data-front-template="starnest-modern"] {
  color: var(--modern-text);
}

.modern-home-shell {
  display: grid;
  gap: 18px;
  padding: 8px;
}

.modern-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  min-height: min(640px, calc(100dvh - 170px));
  padding: clamp(24px, 4vw, 58px);
  border: 1px solid var(--modern-line);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(16, 37, 36, 0.92), rgba(8, 18, 22, 0.9)),
    linear-gradient(90deg, rgba(72, 240, 194, 0.16), transparent 54%);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.modern-home-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.modern-home-copy > span {
  color: var(--modern-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.modern-home-copy h2 {
  max-width: 780px;
  margin: 16px 0 18px;
  color: var(--modern-text);
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: 0;
}

.modern-home-copy p {
  max-width: 620px;
  margin: 0;
  color: #c2d9d3;
  font-size: 17px;
  line-height: 1.75;
}

.modern-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.modern-home-actions .create-button,
.modern-home-actions .secondary-button,
.modern-home-command-card .create-button,
.modern-home-command-card .secondary-button {
  min-height: 44px;
  border-radius: 999px;
  white-space: nowrap;
}

.modern-home-actions .create-button,
.modern-home-command-card .create-button {
  background: var(--modern-accent);
  color: #06100e;
  box-shadow: 0 18px 42px rgba(72, 240, 194, 0.2);
}

.modern-home-actions .secondary-button,
.modern-home-command-card .secondary-button {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--modern-text);
}

.modern-home-orbit {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 390px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--modern-line-soft);
  border-radius: 24px;
  background: #0b1717;
}

.modern-home-orbit::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(5, 13, 14, 0.84) 100%),
    repeating-linear-gradient(115deg, rgba(72, 240, 194, 0.12) 0 1px, transparent 1px 18px);
  pointer-events: none;
}

.modern-home-orbit img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.05);
}

.modern-home-orbit figcaption {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  margin: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(5, 15, 16, 0.72);
  backdrop-filter: blur(18px);
}

.modern-home-orbit strong,
.modern-home-panel h2,
.modern-home-command-card h3,
.modern-home-lessons h2 {
  color: var(--modern-text);
}

.modern-home-orbit span,
.modern-home-panel span,
.modern-home-panel small,
.modern-home-command-card p,
.modern-home-lessons p,
.modern-home-lesson-grid small {
  color: var(--modern-muted);
}

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

.modern-home-metrics article,
.modern-home-command-card,
.modern-home-panel,
.modern-home-lessons {
  border: 1px solid var(--modern-line-soft);
  border-radius: 22px;
  background: var(--modern-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.modern-home-metrics article {
  display: grid;
  gap: 4px;
  padding: 18px;
}

.modern-home-metrics span,
.modern-home-command-card > div > span {
  color: var(--modern-muted);
  font-size: 12px;
  font-weight: 760;
}

.modern-home-metrics strong {
  color: var(--modern-text);
  font-size: 34px;
  line-height: 1;
}

.modern-home-metrics small {
  color: var(--modern-muted);
}

.modern-home-command {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 14px;
}

.modern-home-command-card {
  display: grid;
  align-content: space-between;
  min-height: 230px;
  padding: 24px;
}

.modern-home-command-card.primary {
  background:
    linear-gradient(135deg, rgba(72, 240, 194, 0.18), transparent 44%),
    var(--modern-panel-strong);
}

.modern-home-command-card h3 {
  margin: 10px 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.06;
}

.modern-home-agent-avatar.role-avatar-wrap {
  width: 74px;
  height: 74px;
  margin: 12px 0;
  border-radius: 22px;
  background: rgba(72, 240, 194, 0.12);
}

.modern-home-bento {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 14px;
}

.modern-home-panel {
  padding: 22px;
}

.modern-home-panel-wide {
  grid-row: span 2;
}

.modern-home-template-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.modern-home-template-row button,
.modern-home-feed button,
.modern-home-lesson-grid button {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--modern-text);
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.modern-home-template-row button:hover,
.modern-home-feed button:hover,
.modern-home-lesson-grid button:hover {
  transform: translateY(-2px);
  border-color: rgba(72, 240, 194, 0.48);
  background: rgba(72, 240, 194, 0.08);
}

.modern-home-template-row img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
}

.modern-home-template-row strong,
.modern-home-template-row span,
.modern-home-feed strong,
.modern-home-feed span {
  display: block;
  margin-top: 10px;
}

.modern-home-template-row strong,
.modern-home-feed strong {
  color: var(--modern-text);
}

.modern-home-template-row span,
.modern-home-feed span {
  color: var(--modern-muted);
  font-size: 12px;
}

.modern-home-feed {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.modern-home-feed button {
  padding: 14px;
}

.modern-home-fund {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.18), transparent 62%),
    rgba(255, 255, 255, 0.05);
}

.modern-home-fund strong {
  color: var(--modern-warm);
  font-size: 34px;
}

.modern-home-lessons {
  display: grid;
  grid-template-columns: minmax(240px, 0.42fr) minmax(0, 0.58fr);
  gap: 16px;
  padding: 24px;
}

.modern-home-lessons h2,
.modern-home-panel h2 {
  margin: 0;
}

.modern-home-lesson-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.modern-home-lesson-grid button {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.modern-home-lesson-grid span {
  color: var(--modern-accent);
  font-weight: 800;
}

.modern-home-lesson-grid strong {
  color: var(--modern-text);
}

@media (prefers-reduced-motion: no-preference) {
  .front-dashboard-screen[data-front-template="starnest-modern"] .modern-home-hero,
  .front-dashboard-screen[data-front-template="starnest-modern"] .modern-home-metrics article,
  .front-dashboard-screen[data-front-template="starnest-modern"] .modern-home-command-card,
  .front-dashboard-screen[data-front-template="starnest-modern"] .modern-home-panel,
  .front-dashboard-screen[data-front-template="starnest-modern"] .modern-home-lessons {
    animation: modernHomeEnter 0.58s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .front-dashboard-screen[data-front-template="starnest-modern"] .modern-home-metrics article:nth-child(2),
  .front-dashboard-screen[data-front-template="starnest-modern"] .modern-home-command-card:nth-child(2),
  .front-dashboard-screen[data-front-template="starnest-modern"] .modern-home-panel:nth-child(2) {
    animation-delay: 0.06s;
  }

  .front-dashboard-screen[data-front-template="starnest-modern"] .modern-home-metrics article:nth-child(3),
  .front-dashboard-screen[data-front-template="starnest-modern"] .modern-home-panel:nth-child(3) {
    animation-delay: 0.12s;
  }
}

@keyframes modernHomeEnter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .modern-home-hero,
  .modern-home-command,
  .modern-home-bento,
  .modern-home-lessons {
    grid-template-columns: 1fr;
  }

  .modern-home-metrics,
  .modern-home-template-row,
  .modern-home-lesson-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .modern-home-shell {
    padding: 0;
    gap: 12px;
  }

  .modern-home-hero {
    min-height: auto;
    padding: 22px;
    border-radius: 18px;
  }

  .modern-home-copy h2 {
    font-size: clamp(34px, 12vw, 48px);
  }

  .modern-home-orbit {
    min-height: 280px;
  }

  .modern-home-metrics,
  .modern-home-template-row,
  .modern-home-lesson-grid {
    grid-template-columns: 1fr;
  }

  .modern-home-command-card,
  .modern-home-panel,
  .modern-home-lessons {
    padding: 18px;
    border-radius: 18px;
  }

  .chat-agent-actions {
    gap: 5px;
  }

  .chat-agent-actions #chatExportButton {
    padding: 0 8px;
    font-size: 12px;
  }

  .chat-document-overlay {
    padding: 10px;
  }

  .chat-document-modal {
    width: 100%;
    max-height: 94vh;
  }

  .chat-document-head,
  .chat-document-editor,
  .chat-document-actions {
    padding-right: 16px;
    padding-left: 16px;
  }

  .chat-document-head h2 {
    font-size: 21px;
  }

  .chat-document-editor {
    grid-template-columns: 1fr;
  }

  .chat-document-preview-wrap {
    padding: 12px;
  }

  .chat-document-preview {
    min-height: 0;
    padding: 28px 20px;
  }

  .document-report-head h1 {
    font-size: 23px;
  }

  .document-report-head dl {
    gap: 10px;
  }

  .document-report-head dl div {
    min-width: calc(50% - 8px);
  }

  .chat-document-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .chat-document-actions button {
    width: 100%;
  }
}
/* 登录后只在关键数据同步的短窗口显示，不阻断用户操作。 */
#appLayout.workspace-hydrating::after {
  position: fixed;
  z-index: 120;
  top: 14px;
  left: 50%;
  padding: 8px 14px;
  border: 1px solid #cfe0fb;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(36, 72, 126, 0.12);
  color: #37649f;
  content: "正在同步员工数据…";
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
  transform: translateX(-50%);
}

/* 1.4.17 mobile conversation and recent-work density refinements. */
@media (max-width: 700px) {
  #chatPage .chat-session {
    align-items: stretch;
  }

  #chatPage .chat-session-more {
    align-self: center;
    opacity: 1;
  }

  #chatPage .chat-session-menu {
    position: relative;
    top: auto;
    right: auto;
    z-index: 1;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    margin-top: 2px;
    border-radius: 7px;
    padding: 4px;
    box-shadow: none;
  }

  #chatPage .chat-session-menu button {
    min-width: 0;
    padding: 8px 4px;
    text-align: center;
    white-space: nowrap;
  }

  #chatPage .chat-session-list {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .dashboard-recent-work-panel {
    gap: 10px;
    border-radius: 10px;
    padding: 12px;
  }

  .dashboard-recent-work-heading h2 {
    font-size: 18px;
  }

  .dashboard-recent-work-card {
    gap: 7px;
    min-height: 0;
    border-radius: 9px;
    padding: 10px 11px;
  }

  .dashboard-recent-work-main {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 9px;
  }

  .dashboard-recent-work-avatar.role-avatar-wrap,
  .dashboard-recent-work-group-icon {
    width: 40px;
    height: 40px;
  }

  .dashboard-recent-work-main strong {
    font-size: 13px;
  }

  .dashboard-recent-work-main small {
    font-size: 11px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
  }

  .dashboard-recent-work-foot {
    min-height: 18px;
  }
}

/* 1.5.03 official WeChat customer-service floating entry. */
.online-service-widget {
  position: fixed;
  right: 24px;
  bottom: 26px;
  z-index: 110;
  display: grid;
  justify-items: end;
  pointer-events: none;
}

.online-service-widget.hidden {
  display: none;
}

/* The shared support entry is available in the classic workspace too. */
.online-service-widget[data-front-template-renderer="classic"][data-authenticated="true"] {
  right: 22px;
}

.online-service-widget[data-front-template-renderer="classic"][data-authenticated="true"][data-current-view="chat"],
.online-service-widget[data-front-template-renderer="classic"][data-authenticated="true"][data-current-view="groupChat"] {
  bottom: 84px;
}

.online-service-trigger {
  display: inline-flex;
  min-width: 52px;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 15px;
  padding: 0 14px;
  background: #2f73ff;
  box-shadow: 0 14px 32px rgba(47, 115, 255, 0.26);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  transition:
    min-width 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.online-service-trigger:hover,
.online-service-trigger:focus-visible,
.online-service-widget.is-open .online-service-trigger {
  min-width: 86px;
  background: #2266ea;
  box-shadow: 0 18px 38px rgba(47, 115, 255, 0.32);
  outline: none;
  transform: translateY(-1px);
}

.online-service-trigger svg,
.online-service-mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.online-service-trigger span {
  width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  white-space: nowrap;
  transition:
    width 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    margin-left 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.16s ease;
}

.online-service-trigger:hover span,
.online-service-trigger:focus-visible span,
.online-service-widget.is-open .online-service-trigger span {
  width: 27px;
  margin-left: 7px;
  opacity: 1;
}

.online-service-popover {
  position: absolute;
  right: 0;
  bottom: 62px;
  display: grid;
  width: min(318px, calc(100vw - 32px));
  gap: 14px;
  visibility: hidden;
  border: 1px solid #dce5ef;
  border-radius: 15px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 24px 58px rgba(23, 42, 74, 0.2);
  color: #1a2433;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transform-origin: right bottom;
  transition:
    opacity 0.18s ease,
    transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.18s;
}

.online-service-widget.is-open .online-service-popover {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.online-service-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: #7b8796;
  cursor: pointer;
  font-size: 20px;
}

.online-service-close:hover,
.online-service-close:focus-visible {
  background: #f0f4f8;
  color: #263446;
  outline: none;
}

.online-service-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding-right: 24px;
}

.online-service-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #eaf4ff;
  color: #2f73ff;
}

.online-service-heading > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.online-service-heading strong {
  color: #172235;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.online-service-heading span {
  overflow: hidden;
  color: #69778a;
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-service-availability {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #536175;
  font-size: 11px;
}

.online-service-availability > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1eba81;
  box-shadow: 0 0 0 4px rgba(30, 186, 129, 0.12);
}

.online-service-availability strong {
  font-weight: 720;
}

.online-service-qr {
  display: grid;
  min-height: 148px;
  place-items: center;
  gap: 8px;
  overflow: hidden;
  border-radius: 12px;
  padding: 12px;
  background: #f5f8fb;
}

.online-service-qr > img {
  display: block;
  width: 148px;
  height: 148px;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.online-service-qr > span {
  color: #667589;
  font-size: 11px;
  font-weight: 700;
}

.online-service-qr-empty {
  display: grid;
  max-width: 210px;
  place-items: center;
  gap: 6px;
  text-align: center;
}

.online-service-qr-empty::before {
  width: 38px;
  height: 38px;
  border: 1px solid #cbd9ea;
  border-radius: 11px;
  background:
    linear-gradient(90deg, #2f73ff 7px, transparent 7px) 8px 8px / 14px 7px no-repeat,
    linear-gradient(#2f73ff 7px, transparent 7px) 8px 8px / 7px 14px no-repeat,
    linear-gradient(270deg, #2f73ff 7px, transparent 7px) calc(100% - 8px) calc(100% - 8px) / 14px 7px no-repeat,
    linear-gradient(0deg, #2f73ff 7px, transparent 7px) calc(100% - 8px) calc(100% - 8px) / 7px 14px no-repeat;
  content: "";
}

.online-service-qr-empty strong {
  color: #263447;
  font-size: 13px;
}

.online-service-qr-empty span {
  color: #718096;
  font-size: 11px;
  line-height: 1.55;
}

.online-service-open {
  display: grid;
  min-height: 42px;
  place-items: center;
  border-radius: 10px;
  background: #2f73ff;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.online-service-open:hover,
.online-service-open:focus-visible {
  background: #2266ea;
  outline: 3px solid rgba(47, 115, 255, 0.18);
  outline-offset: 2px;
}

.online-service-popover > small {
  color: #7b8797;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

html[data-business-theme="dark"] .online-service-popover {
  border-color: #3a3a3a;
  background: #202020;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.5);
  color: #fff;
}

html[data-business-theme="dark"] .online-service-heading strong,
html[data-business-theme="dark"] .online-service-qr-empty strong {
  color: #fff;
}

html[data-business-theme="dark"] .online-service-heading span,
html[data-business-theme="dark"] .online-service-availability,
html[data-business-theme="dark"] .online-service-qr-empty span,
html[data-business-theme="dark"] .online-service-popover > small {
  color: #b9b9b9;
}

html[data-business-theme="dark"] .online-service-mark {
  background: rgba(51, 156, 255, 0.16);
  color: #55aaff;
}

html[data-business-theme="dark"] .online-service-close {
  color: #b2b2b2;
}

html[data-business-theme="dark"] .online-service-close:hover,
html[data-business-theme="dark"] .online-service-close:focus-visible {
  background: #2c2c2c;
  color: #fff;
}

html[data-business-theme="dark"] .online-service-qr {
  background: #282828;
}

@media (max-width: 720px) {
  .online-service-widget {
    right: 14px;
    bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .online-service-widget[data-front-template-renderer="classic"][data-authenticated="true"][data-current-view="chat"],
  .online-service-widget[data-front-template-renderer="classic"][data-authenticated="true"][data-current-view="groupChat"] {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .online-service-trigger,
  .online-service-trigger:hover,
  .online-service-trigger:focus-visible,
  .online-service-widget.is-open .online-service-trigger {
    position: relative;
    min-width: 36px;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    padding: 0;
    box-shadow: 0 7px 17px rgba(47, 115, 255, 0.2);
    transform: none;
  }

  .online-service-trigger::before {
    position: absolute;
    inset: -4px;
    content: "";
  }

  .online-service-trigger svg {
    width: 16px;
    height: 16px;
  }

  .online-service-trigger span,
  .online-service-trigger:hover span,
  .online-service-trigger:focus-visible span,
  .online-service-widget.is-open .online-service-trigger span {
    display: none;
  }

  .online-service-popover {
    position: fixed;
    right: 14px;
    bottom: calc(144px + env(safe-area-inset-bottom));
    left: 14px;
    width: auto;
    transform-origin: right bottom;
  }

  .online-service-widget[data-mobile-direct="false"] .online-service-open {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .online-service-trigger,
  .online-service-trigger span,
  .online-service-popover {
    transition: none;
  }
}

.chat-message-row.optimistic-submission {
  opacity: 0.82;
}

.optimistic-submission-state {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 5px;
  color: currentColor;
  font-size: 11px;
  line-height: 1.2;
  opacity: 0.74;
}

.optimistic-submission-state::after {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  animation: optimistic-submission-pulse 900ms ease-in-out infinite;
}

@keyframes optimistic-submission-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.82);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .optimistic-submission-state::after {
    animation: none;
  }
}
.scheduled-task-shell{display:grid;gap:22px;padding:28px;max-width:1240px;margin:0 auto}.scheduled-task-hero{display:flex;justify-content:space-between;align-items:end;gap:24px;padding:30px;border-radius:24px;background:linear-gradient(135deg,#111a33,#254ca5);color:#fff}.scheduled-task-hero span,.scheduled-agent-map header span,.scheduled-task-editor header span{display:block;font-size:11px;letter-spacing:.16em;opacity:.68}.scheduled-task-hero h1{margin:8px 0;font-size:34px}.scheduled-task-hero p{max-width:720px;margin:0;line-height:1.7;color:#dce6ff}.scheduled-agent-map{padding:22px;border:1px solid var(--border);border-radius:20px;background:var(--card)}.scheduled-agent-map>header{display:flex;justify-content:space-between;align-items:end;margin-bottom:16px}.scheduled-agent-map h2{margin:5px 0 0;font-size:20px}.scheduled-agent-map>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}.scheduled-agent-map article{padding:15px;border-radius:15px;background:var(--surface);border:1px solid var(--border)}.scheduled-agent-map article strong,.scheduled-agent-map article em{display:block}.scheduled-agent-map article em{margin-top:4px;font-size:12px;color:var(--primary)}.scheduled-agent-map article p{margin:10px 0 0;font-size:13px;line-height:1.6;color:var(--muted)}.scheduled-task-editor{position:fixed;z-index:90;inset:50%;transform:translate(-50%,-50%);width:min(760px,calc(100vw - 32px));max-height:calc(100vh - 40px);overflow:auto;padding:24px;border-radius:22px;background:var(--card);border:1px solid var(--border);box-shadow:0 28px 90px rgba(7,18,48,.28)}.scheduled-task-editor>header{display:flex;justify-content:space-between;align-items:start}.scheduled-task-editor>header h2{margin:5px 0 16px}.scheduled-task-editor>header button{border:0;background:transparent;font-size:26px}.scheduled-task-editor form{display:grid;grid-template-columns:1fr 1fr;gap:16px}.scheduled-task-editor label{display:grid;gap:7px;font-size:13px}.scheduled-task-editor input,.scheduled-task-editor select,.scheduled-task-editor textarea{width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--text);padding:11px 12px}.scheduled-task-editor textarea{min-height:130px;resize:vertical}.scheduled-task-prompt,.scheduled-task-confirm-note,.scheduled-task-form-actions{grid-column:1/-1}.scheduled-task-editor small{color:var(--muted)}.scheduled-task-confirm-note{padding:12px 14px;border-radius:12px;background:#fff7db;color:#725600;font-size:13px}.scheduled-task-form-actions{display:flex;justify-content:flex-end;gap:10px}.scheduled-task-list{display:grid;gap:14px}.scheduled-task-card{padding:20px;border:1px solid var(--border);border-radius:18px;background:var(--card)}.scheduled-task-card.is-paused{opacity:.68}.scheduled-task-card header,.scheduled-task-card footer{display:flex;justify-content:space-between;gap:18px;align-items:center}.scheduled-task-card header span{font-size:12px;color:var(--primary)}.scheduled-task-card h3{margin:5px 0 0}.scheduled-task-card header em{padding:5px 9px;border-radius:999px;background:#e8f7ee;color:#13713d;font-size:12px}.scheduled-task-card.is-paused header em{background:#f1f2f5;color:#697080}.scheduled-task-card>p{margin:14px 0;line-height:1.65;color:var(--muted)}.scheduled-task-card footer>span{font-size:13px}.scheduled-task-card footer div{display:flex;gap:8px;flex-wrap:wrap}.scheduled-task-card footer button{border:1px solid var(--border);border-radius:9px;background:var(--surface);padding:7px 10px;color:var(--text)}.scheduled-task-empty{display:grid;place-items:center;gap:7px;min-height:150px;border:1px dashed var(--border);border-radius:18px;color:var(--muted)}
@media(max-width:720px){.scheduled-task-shell{padding:14px}.scheduled-task-hero{align-items:start;flex-direction:column;padding:22px}.scheduled-task-hero h1{font-size:28px}.scheduled-task-editor form{grid-template-columns:1fr}.scheduled-task-prompt,.scheduled-task-confirm-note,.scheduled-task-form-actions{grid-column:auto}.scheduled-task-card header,.scheduled-task-card footer{align-items:flex-start;flex-direction:column}}

/* Personal WeChat command channel: separated from enterprise customer service. */
.business-nav-channel-icon,
.personal-wechat-menu-icon {
  display: inline-grid;
  place-items: center;
}

.business-nav-channel-icon svg,
.personal-wechat-menu-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
