:root {
  color-scheme: light;
  --bg: #f8faf8;
  --panel: #ffffff;
  --text: #111c18;
  --muted: #66736d;
  --line: #dbe3df;
  --primary: #126141;
  --primary-hover: #0c4630;
  --silver: #edf2ef;
  --silver-strong: #cbd8d1;
  --error-bg: #fef2f2;
  --error-text: #991b1b;
  --success-bg: #ecfdf3;
  --success-text: #05603a;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-body {
  overflow-x: hidden;
  background:
    linear-gradient(135deg, #ffffff 0%, #f9fbfa 42%, #eef5f1 100%);
}

.login-shell {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  padding: 34px;
}

.login-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(18, 97, 65, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 97, 65, 0.05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 72%, transparent 100%);
  pointer-events: none;
}

.nature-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.login-stage {
  position: relative;
  z-index: 1;
  width: min(100%, 1120px);
  min-height: min(720px, calc(100svh - 68px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  align-items: center;
  gap: clamp(34px, 7vw, 110px);
}

.login-copy {
  max-width: 600px;
}

.system-label {
  margin: 0 0 18px;
  color: var(--primary);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
}

.login-copy h1 {
  max-width: 620px;
  font-size: clamp(60px, 8.4vw, 128px);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: 0;
}

.signal-line {
  display: grid;
  grid-template-columns: 72px 34px 12px;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.signal-line span {
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  transform-origin: left center;
  animation: signalPulse 3.8s ease-in-out infinite;
}

.signal-line span:nth-child(2) {
  background: #94aaa0;
  animation-delay: 0.45s;
}

.signal-line span:nth-child(3) {
  background: #c6d3cd;
  animation-delay: 0.9s;
}

.login-panel,
.page-panel {
  width: min(100%, 420px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.login-panel {
  position: relative;
  width: min(100%, 430px);
  padding: 30px;
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(181, 199, 190, 0.72);
  box-shadow:
    0 24px 70px rgba(28, 43, 36, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(22px);
  animation: panelIn 760ms cubic-bezier(.2, .8, .2, 1) both;
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.66);
  pointer-events: none;
}

.page-panel {
  width: min(100%, 760px);
}

.page-panel.wide {
  width: min(100%, 1040px);
}

.brand,
.page-header,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  justify-content: flex-start;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #e6f4ea;
  color: var(--primary);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(18, 97, 65, 0.08);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: 0;
}

.form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: #33433b;
  font-size: 14px;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(191, 205, 198, 0.92);
  border-radius: 6px;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(18, 97, 65, 0.14);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(18, 97, 65, 0.08);
  transform: translateY(-1px);
}

.check {
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
}

.check input {
  min-height: auto;
}

button,
.link-button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  background: var(--primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

button:hover,
.link-button:hover {
  background: var(--primary-hover);
}

.login-submit {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  margin-top: 2px;
  background: #111c18;
  box-shadow: 0 12px 26px rgba(17, 28, 24, 0.18);
}

.login-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.38) 45%, transparent 65%);
  transform: translateX(-120%);
}

.login-submit:hover {
  background: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(18, 97, 65, 0.22);
}

.login-submit:hover::before {
  animation: lightSweep 860ms ease;
}

.login-submit.is-loading {
  pointer-events: none;
  color: rgba(255, 255, 255, 0.76);
}

.secondary {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.secondary:hover {
  background: #f9fafb;
}

.compact {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 14px;
}

.messages {
  position: fixed;
  top: 18px;
  left: 50%;
  width: min(92vw, 520px);
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  z-index: 10;
}

.message {
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.09);
  backdrop-filter: blur(12px);
}

.message.error {
  background: var(--error-bg);
  color: var(--error-text);
  animation: messageShake 320ms ease both;
}

.message.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.muted {
  color: var(--muted);
}

.text-link {
  color: var(--primary);
  font-weight: 700;
}

table {
  width: 100%;
  margin-top: 22px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
}

th {
  color: #475467;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 12px;
}

.badge.ok {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge.danger {
  background: var(--error-bg);
  color: var(--error-text);
}

.badge.neutral {
  background: #eef6f2;
  color: var(--accent-ink);
}

.skill-version-input {
  width: 86px;
  min-height: 30px;
  padding: 5px 9px;
  color: var(--accent-ink);
  font-weight: 800;
  text-align: center;
  background: #eef6f2;
  border: 1px solid rgba(47, 141, 115, 0.18);
  border-radius: 999px;
}

.skill-version-input:focus {
  outline: 2px solid rgba(47, 141, 115, 0.22);
  background: #fff;
}

.admin-console {
  width: min(100%, 1240px);
  display: grid;
  gap: 18px;
  align-self: start;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.admin-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-tabs {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 8px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-tab {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 64px;
  padding: 12px;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
}

.admin-tab:hover,
.admin-tab.is-active {
  color: var(--primary);
  background: #f3f8f5;
  border-color: #cfe0d8;
}

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

.admin-tab span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.admin-workspace {
  min-width: 0;
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.is-active {
  display: block;
}

.admin-subsection {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.directory-sync-summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-top: 18px;
  padding: 5px 11px;
  color: var(--muted);
  font-size: 13px;
  background: var(--silver);
  border-radius: 999px;
}

.directory-table-wrap {
  width: 100%;
  max-height: calc(100vh - 270px);
  min-height: 360px;
  margin-top: 18px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: var(--silver-strong) transparent;
}

.directory-table-wrap::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.directory-table-wrap::-webkit-scrollbar-thumb {
  background: var(--silver-strong);
  border-radius: 999px;
}

.directory-table-wrap::-webkit-scrollbar-track {
  background: #f5f8f6;
  border-radius: 999px;
}

.directory-users-table {
  min-width: 1140px;
  margin-top: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.directory-users-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #ffffff;
}

.directory-users-table th,
.directory-users-table td {
  vertical-align: middle;
  white-space: nowrap;
  background: #ffffff;
}

.directory-users-table th:nth-child(1),
.directory-users-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 240px;
  width: 240px;
}

.directory-users-table th:nth-child(2),
.directory-users-table td:nth-child(2) {
  position: sticky;
  left: 240px;
  z-index: 2;
  min-width: 220px;
  width: 220px;
  box-shadow: 12px 0 18px -18px rgba(15, 23, 42, 0.42);
}

.directory-users-table th:nth-child(3),
.directory-users-table td:nth-child(3) {
  min-width: 260px;
  white-space: normal;
}

.directory-users-table th:nth-child(4),
.directory-users-table td:nth-child(4) {
  min-width: 120px;
  white-space: normal;
}

.directory-users-table th:nth-child(5),
.directory-users-table td:nth-child(5) {
  min-width: 74px;
  text-align: center;
}

.directory-users-table th:nth-child(6),
.directory-users-table td:nth-child(6) {
  min-width: 132px;
}

.directory-users-table th:nth-child(7),
.directory-users-table td:nth-child(7) {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 112px;
  width: 112px;
  text-align: center;
  box-shadow: -12px 0 18px -18px rgba(15, 23, 42, 0.42);
}

.directory-users-table thead th:nth-child(1),
.directory-users-table thead th:nth-child(2),
.directory-users-table thead th:nth-child(7) {
  z-index: 4;
}

.account-users-table th:nth-child(1),
.account-users-table td:nth-child(1) {
  left: 0;
  min-width: 240px;
  width: 240px;
  box-shadow: 12px 0 18px -18px rgba(15, 23, 42, 0.42);
}

.account-users-table th:nth-child(2),
.account-users-table td:nth-child(2) {
  position: static;
  min-width: 220px;
  width: auto;
  box-shadow: none;
}

.account-users-table th:nth-child(3),
.account-users-table td:nth-child(3) {
  min-width: 240px;
  white-space: normal;
}

.account-users-table th:nth-child(7),
.account-users-table td:nth-child(7) {
  position: sticky;
  right: 0;
  z-index: 12;
  min-width: 142px;
  width: 142px;
  text-align: center;
  box-shadow: -12px 0 18px -18px rgba(15, 23, 42, 0.42);
}

.account-users-table thead th:nth-child(1),
.account-users-table thead th:nth-child(7) {
  z-index: 14;
}

.account-users-table thead th:nth-child(2) {
  z-index: 1;
}

.admin-table-wrap {
  max-height: calc(100vh - 330px);
  min-height: 260px;
}

.admin-users-table {
  min-width: 780px;
}

.admin-users-table th:nth-child(1),
.admin-users-table td:nth-child(1) {
  left: 0;
  min-width: 220px;
  width: 220px;
  box-shadow: 12px 0 18px -18px rgba(15, 23, 42, 0.42);
}

.admin-users-table th:nth-child(2),
.admin-users-table td:nth-child(2),
.admin-users-table th:nth-child(3),
.admin-users-table td:nth-child(3) {
  position: static;
  z-index: 1;
  width: auto;
  box-shadow: none;
}

.admin-users-table th:nth-child(2),
.admin-users-table td:nth-child(2) {
  min-width: 180px;
}

.admin-users-table th:nth-child(3),
.admin-users-table td:nth-child(3) {
  min-width: 220px;
  text-align: left;
}

.admin-users-table th:nth-child(4),
.admin-users-table td:nth-child(4),
.admin-users-table th:nth-child(5),
.admin-users-table td:nth-child(5) {
  position: static;
  z-index: 1;
  min-width: 160px;
  width: auto;
  text-align: left;
  box-shadow: none;
}

.admin-users-table th:nth-child(5),
.admin-users-table td:nth-child(5) {
  position: sticky;
  right: 0;
  z-index: 12;
  min-width: 150px;
  width: 150px;
  text-align: center;
  box-shadow: -12px 0 18px -18px rgba(15, 23, 42, 0.42);
}

.admin-users-table thead th:nth-child(1),
.admin-users-table thead th:nth-child(5) {
  z-index: 14;
}

.admin-primary-label {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--ink);
  font-weight: 850;
  white-space: nowrap;
}

.shared-skills-table {
  min-width: 1280px;
}

.admin-skill-search {
  display: grid;
  gap: 6px;
  max-width: 520px;
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.admin-skill-search input {
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.skill-expand-toggle {
  display: inline-grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  min-height: 0;
  place-items: center;
  padding: 0;
  color: var(--accent);
  background: #eef7f3;
  border: 1px solid #cfe6dd;
  border-radius: 6px;
  font-weight: 900;
}

.shared-skills-table th:nth-child(1),
.shared-skills-table td:nth-child(1) {
  left: 0;
  min-width: 280px;
  width: 280px;
  box-shadow: 12px 0 18px -18px rgba(15, 23, 42, 0.42);
}

.shared-skills-table th:nth-child(2),
.shared-skills-table td:nth-child(2) {
  position: static;
  min-width: 90px;
  width: 90px;
  box-shadow: none;
}

.shared-skills-table th:nth-child(3),
.shared-skills-table td:nth-child(3) {
  position: static;
  min-width: 220px;
  width: auto;
  box-shadow: none;
}

.shared-skills-table th:nth-child(4),
.shared-skills-table td:nth-child(4) {
  min-width: 150px;
  white-space: normal;
}

.shared-skills-table th:nth-child(5),
.shared-skills-table td:nth-child(5) {
  min-width: 150px;
  white-space: normal;
}

.shared-skills-table th:nth-child(6),
.shared-skills-table td:nth-child(6) {
  min-width: 82px;
  text-align: right;
}

.shared-skills-table th:nth-child(7),
.shared-skills-table td:nth-child(7) {
  position: static;
  min-width: 150px;
  width: auto;
  text-align: left;
  box-shadow: none;
}

.shared-skills-table th:nth-child(8),
.shared-skills-table td:nth-child(8) {
  position: sticky;
  right: 0;
  z-index: 12;
  min-width: 184px;
  width: 184px;
  text-align: center;
  box-shadow: -12px 0 18px -18px rgba(15, 23, 42, 0.42);
}

.shared-skills-table thead th:nth-child(1),
.shared-skills-table thead th:nth-child(8) {
  z-index: 14;
}

.shared-skills-table thead th:nth-child(2),
.shared-skills-table thead th:nth-child(3),
.shared-skills-table thead th:nth-child(7) {
  z-index: 1;
}

.skill-admin-actions {
  display: grid;
  grid-template-columns: repeat(4, 34px);
  justify-content: center;
  gap: 7px;
}

.skill-version-admin-row td {
  position: static !important;
  padding: 0 !important;
  background: #fbfdfc;
  box-shadow: none !important;
}

.skill-version-admin-panel {
  display: grid;
  gap: 8px;
  min-width: 900px;
  padding: 12px 0 14px 64px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.skill-version-admin-list {
  display: grid;
  gap: 8px;
}

.skill-version-admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 226px;
  gap: 0;
  align-items: center;
  padding: 10px 0 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.skill-version-admin-item.is-offline {
  opacity: 0.68;
}

.skill-version-admin-item strong,
.skill-version-admin-item span,
.skill-version-admin-item small {
  display: block;
}

.skill-version-admin-item span {
  margin-top: 4px;
  color: var(--ink);
}

.skill-version-admin-item small {
  margin-top: 3px;
  color: var(--muted);
}

.skill-version-admin-actions {
  position: sticky;
  right: 0;
  z-index: 3;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: flex-end;
  align-self: stretch;
  align-items: center;
  padding: 0 12px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-radius: 0 8px 8px 0;
  box-shadow: -12px 0 18px -18px rgba(15, 23, 42, 0.42);
}

.skill-version-admin-item.is-offline .skill-version-admin-actions {
  background: #fff;
  opacity: 1;
}

.compact.danger {
  color: #fff;
  background: #b42318;
  border-color: #b42318;
}

.compact.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.account-policy-actions {
  grid-template-columns: repeat(3, 34px);
}

.skill-icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #667085;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  background: #f8faf9;
  border: 1px solid #d9e2dd;
  border-radius: 8px;
}

.skill-icon-button::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 80;
  right: 50%;
  bottom: calc(100% + 8px);
  max-width: 112px;
  padding: 5px 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  background: #1f2937;
  border-radius: 7px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transform: translate(50%, 4px);
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.skill-icon-button:hover::after,
.skill-icon-button:focus-visible::after {
  opacity: 1;
  transform: translate(50%, 0);
}

.shared-skills-table td:nth-child(8):has(.skill-icon-button:hover),
.shared-skills-table td:nth-child(8):has(.skill-icon-button:focus-visible) {
  z-index: 60;
}

.account-users-table td:nth-child(8):has(.skill-icon-button:hover),
.account-users-table td:nth-child(8):has(.skill-icon-button:focus-visible) {
  z-index: 60;
}

.account-users-table td:nth-child(7):has(.skill-icon-button:hover),
.account-users-table td:nth-child(7):has(.skill-icon-button:focus-visible) {
  z-index: 60;
}

.account-nickname-editor {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.account-nickname-input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  color: var(--ink);
  font: inherit;
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.account-nickname-input:focus {
  outline: 2px solid rgba(47, 141, 115, 0.2);
  outline-offset: 2px;
  border-color: rgba(47, 141, 115, 0.35);
}

.account-nickname-save {
  min-width: 46px;
  height: 34px;
  padding: 0 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: #2f8d73;
  border: 1px solid #2f8d73;
  border-radius: 8px;
}

.account-nickname-save:disabled {
  color: #98a2b3;
  background: #f2f4f7;
  border-color: #e4e7ec;
}

.account-nickname-status {
  display: block;
  min-height: 16px;
  margin-top: 4px;
  color: #667085;
  font-size: 11px;
  line-height: 1.2;
}

.skill-icon-button:hover {
  background: #ffffff;
  border-color: #a9b8b0;
  color: #344054;
}

.skill-icon-button.is-recommend.is-active {
  color: #be123c;
  background: #fff1f2;
  border-color: #fda4af;
}

.skill-icon-button.is-pin.is-active {
  color: #166534;
  background: #dcfce7;
  border-color: #86efac;
}

.skill-icon-button.is-hide.is-active {
  color: #92400e;
  background: #fffbeb;
  border-color: #fcd34d;
}

.skill-icon-button.is-account.is-active {
  color: #be123c;
  background: #fff1f2;
  border-color: #fda4af;
}

.skill-icon-button.is-publish.is-active {
  color: #7c2d12;
  background: #fff7ed;
  border-color: #fdba74;
}

.skill-icon-button.is-download.is-active {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #93c5fd;
}

.skill-icon-button.is-delete {
  color: #be123c;
  background: #fff1f2;
  border-color: #fecdd3;
}

.skill-icon-button.is-delete:hover {
  color: #9f1239;
  background: #ffe4e6;
  border-color: #fda4af;
}

.account-action-button {
  min-width: 84px;
  justify-content: center;
}

.account-action-button.is-close {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.account-action-button.is-close:hover {
  background: #ffe4e6;
  border-color: #fda4af;
}

.account-action-button.is-enable {
  background: var(--success-bg);
  border-color: #b7ebc9;
  color: var(--success-text);
}

.account-action-button.is-enable:hover {
  background: #dcfce7;
  border-color: #86efac;
}

.directory-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.directory-user-cell img,
.directory-avatar-fallback {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.directory-user-cell img {
  object-fit: cover;
  background: var(--silver);
}

.directory-avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 700;
  background: #e6f4ea;
}

.directory-user-cell strong,
.directory-user-cell small {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-user-cell small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.department-scroll {
  display: grid;
  gap: 5px;
  min-width: 180px;
  max-width: 300px;
  max-height: 130px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--silver-strong) transparent;
}

.department-scroll::-webkit-scrollbar {
  width: 6px;
}

.department-scroll::-webkit-scrollbar-thumb {
  background: var(--silver-strong);
  border-radius: 999px;
}

.department-scroll span {
  display: block;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--silver);
  color: #33433b;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.mac-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 160px;
  max-width: 260px;
}

.mac-list span {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 6px;
  color: #33433b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.2;
  background: var(--silver);
}

.admin-add-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

.admin-email-picker {
  position: relative;
}

.admin-email-menu {
  position: absolute;
  z-index: 30;
  right: 0;
  left: 0;
  top: calc(100% + 6px);
  max-height: 320px;
  overflow: auto;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.admin-email-option {
  display: grid;
  width: 100%;
  min-height: 0;
  gap: 2px;
  padding: 9px 10px;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.admin-email-option:hover,
.admin-email-option:focus-visible {
  background: var(--silver);
  outline: none;
}

.admin-email-option strong {
  font-size: 14px;
}

.admin-email-option span,
.admin-email-option small,
.admin-email-empty {
  color: var(--muted);
  font-size: 12px;
}

.admin-email-empty {
  padding: 10px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.agent-runtime-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.agent-actions {
  margin-top: 16px;
  display: grid;
  gap: 8px;
  max-width: 420px;
}

.agent-sheet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.agent-sheet-tab.is-active {
  background: var(--primary);
  color: #ffffff;
}

.agent-sheet-view {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

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

.agent-info-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfc;
}

.agent-info-block span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.agent-info-block strong {
  display: block;
  font-size: 17px;
  word-break: break-word;
}

.agent-detail-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.agent-detail-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.agent-detail-list dt,
.agent-detail-list dd {
  margin: 0;
  font-size: 14px;
}

.agent-detail-list dt {
  color: var(--muted);
}

.agent-detail-list dd {
  word-break: break-word;
}

.doc-viewer-header {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.doc-viewer-header span {
  color: var(--muted);
  font-size: 13px;
  word-break: break-word;
}

.doc-viewer {
  max-height: 420px;
  overflow: auto;
  margin: 0;
  border-radius: 8px;
  background: #111c18;
  color: #e7f0eb;
  padding: 14px;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.55;
}

.skills-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.skill-row {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  background: #fbfdfc;
  color: var(--text);
  text-align: left;
}

.skill-row span {
  display: grid;
  gap: 4px;
}

.skill-row em,
.skill-row small {
  color: var(--muted);
  font-style: normal;
}

.skill-doc-target {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.memory-layer {
  display: grid;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.memory-layer:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.memory-layer h2 {
  font-size: 18px;
}

.memory-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.memory-chip {
  border-radius: 999px;
  background: var(--silver);
  color: #33433b;
  padding: 6px 10px;
  font-size: 13px;
}

.memory-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
}

.memory-item strong,
.memory-item span {
  display: block;
}

.memory-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.memory-item p {
  margin: 10px 0 0;
  color: #33433b;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.metric-card {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdfc;
}

.metric-card span,
.section-heading p,
.monitor-note,
.status-list dt {
  color: var(--muted);
}

.metric-card span {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
}

.metric-card strong {
  display: block;
  color: var(--text);
  font-size: 26px;
  line-height: 1.15;
  word-break: break-word;
}

.metric-card strong.state-active {
  color: var(--success-text);
}

.metric-card strong.state-error {
  color: var(--error-text);
}

.metric-card strong.state-idle,
.metric-card strong.state-no_data {
  color: #475467;
}

.monitor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 16px;
  margin-top: 16px;
}

.usage-chart-panel,
.model-check-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-heading h2 {
  font-size: 18px;
}

.section-heading p {
  margin: 5px 0 0;
  font-size: 13px;
}

.usage-chart {
  width: 100%;
  height: 180px;
  display: block;
}

.usage-chart-stack {
  display: grid;
  gap: 18px;
}

.chart-block + .chart-block {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.status-list {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
}

.model-config-form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.model-config-form label {
  font-size: 13px;
}

.model-config-form select {
  min-height: 42px;
  border: 1px solid rgba(191, 205, 198, 0.92);
  border-radius: 6px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
}

.model-config-form input {
  min-height: 42px;
  font-size: 14px;
}

.model-config-form select:disabled {
  color: #66736d;
  background: #f6f8f7;
}

.model-source {
  margin: -4px 0 2px;
}

.status-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.status-list dt,
.status-list dd {
  margin: 0;
  font-size: 14px;
}

.status-list dd {
  color: var(--text);
  text-align: right;
}

.monitor-note {
  min-height: 38px;
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.nav-config-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 8px 0 14px;
  padding: 4px 10px;
  color: var(--muted);
  font-size: 13px;
  background: var(--silver);
  border-radius: 999px;
}

.nav-config-board {
  display: grid;
  gap: 14px;
}

.nav-config-group {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.nav-config-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.nav-config-group header span {
  color: var(--muted);
  font-size: 13px;
}

.nav-config-list {
  display: grid;
  gap: 10px;
  min-height: 72px;
  padding: 12px;
}

.nav-config-list:empty::before {
  content: "拖到这里";
  display: grid;
  place-items: center;
  min-height: 54px;
  color: var(--muted);
  border: 1px dashed var(--silver-strong);
  border-radius: 8px;
}

.nav-config-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.nav-config-card.is-dragging {
  opacity: 0.56;
  outline: 2px solid rgba(18, 97, 65, 0.22);
}

.nav-config-card.is-hidden-item {
  background: #f6f8f7;
}

.nav-config-card.is-hidden-item .nav-label-field,
.nav-config-card.is-hidden-item .nav-description-field {
  color: var(--muted);
}

.nav-card-main {
  display: grid;
  grid-template-columns: 34px 78px 64px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.nav-card-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-width: 0;
}

.nav-card-detail label {
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.nav-config-card input,
.nav-config-card select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid rgba(191, 205, 198, 0.92);
  border-radius: 6px;
  padding: 7px 9px;
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
}

.nav-token-field {
  text-transform: uppercase;
  text-align: center;
  font-weight: 700;
}

.nav-card-key {
  grid-column: 4 / 5;
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.nav-card-actions {
  grid-column: 5 / 6;
  grid-row: 1 / 3;
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.nav-card-actions button:disabled {
  opacity: 0.42;
  cursor: default;
}

.drag-handle {
  min-height: 34px;
  padding: 0;
  color: var(--muted);
  background: var(--silver);
  cursor: grab;
}

.drag-handle:hover {
  color: var(--primary);
  background: #e5eee9;
}

.switch-cell {
  grid-template-columns: 18px auto;
  align-items: center;
  gap: 8px;
  min-width: 72px;
  color: var(--muted);
}

.switch-cell input {
  width: 16px;
  min-height: 16px;
}

@media (max-width: 640px) {
  .shell {
    padding: 16px;
  }

  .login-shell {
    min-height: 100svh;
    padding: 18px;
    align-items: stretch;
  }

  .login-stage {
    min-height: calc(100svh - 36px);
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
  }

  .login-copy h1 {
    font-size: clamp(48px, 18vw, 74px);
  }

  .system-label {
    margin-bottom: 12px;
  }

  .signal-line {
    margin-top: 22px;
  }

  .login-panel,
  .page-panel {
    padding: 22px;
  }

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

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .admin-metrics,
  .agent-runtime-grid,
  .agent-sheet-grid,
  .monitor-grid {
    grid-template-columns: 1fr;
  }

  .nav-card-main,
  .nav-card-detail,
  .admin-add-form {
    grid-template-columns: 1fr;
  }

  .nav-card-actions {
    justify-content: stretch;
  }

  .nav-card-actions button {
    flex: 1;
  }

  .admin-topbar,
  .admin-layout {
    grid-template-columns: 1fr;
  }

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

  .admin-tabs {
    position: static;
  }

  .agent-detail-list div {
    grid-template-columns: 1fr;
  }
}

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

  .login-copy {
    max-width: 680px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes lightSweep {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(120%);
  }
}

@keyframes signalPulse {
  0%, 100% {
    transform: scaleX(0.72);
    opacity: 0.48;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes messageShake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}
