/* ============================================================
   弦一科技 XY Design System
   深海军蓝导航 + 浅色工作区 · 品牌 token 取自 logo 实测色值
   ============================================================ */

:root {
  /* --- 品牌色 --- */
  --xy-navy: #011A45;          /* logo 字组深海军蓝 */
  --xy-navy-900: #010E26;
  --xy-navy-800: #03285F;
  --xy-navy-700: #0A3A7E;
  --xy-electric: #2E6BFF;      /* logo 蓝提亮到可读对比度 */
  --xy-electric-600: #1E54D8;
  --xy-electric-050: #EDF3FF;
  --xy-cyan: #00C0F0;          /* logo 渐变青 */
  --xy-gradient: linear-gradient(90deg, var(--xy-electric), var(--xy-cyan));

  /* --- 中性色 --- */
  --xy-canvas: #F4F7FB;
  --xy-card: #FFFFFF;
  --xy-border: #E3EAF5;
  --xy-border-strong: #C9D6EA;
  --xy-ink: #0B1F3D;
  --xy-muted: #5A6B85;
  --xy-faint: #8A99B3;

  /* --- 语义色(与品牌调和) --- */
  --xy-success: #1FA471;
  --xy-warning: #E9A23B;
  --xy-danger: #E5484D;

  /* --- 字体 --- */
  --xy-font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
                "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --xy-font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
                  "Liberation Mono", monospace;

  /* --- 形状 --- */
  --xy-radius: 10px;
  --xy-radius-lg: 14px;
  --xy-shadow-sm: 0 1px 2px rgba(11, 31, 61, 0.04), 0 1px 6px rgba(11, 31, 61, 0.05);
  --xy-shadow-md: 0 4px 16px rgba(11, 31, 61, 0.08);

  /* --- Bootstrap 变量接管 --- */
  --bs-primary: var(--xy-electric);
  --bs-primary-rgb: 46, 107, 255;
  --bs-body-bg: var(--xy-canvas);
  --bs-body-color: var(--xy-ink);
  --bs-body-font-family: var(--xy-font-ui);
  --bs-border-color: var(--xy-border);
  --bs-link-color: var(--xy-electric);
  --bs-link-hover-color: var(--xy-electric-600);
  --bs-success-rgb: 31, 164, 113;
  --bs-warning-rgb: 233, 162, 59;
  --bs-danger-rgb: 229, 72, 77;
}

/* ---------- 基础 ---------- */
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--xy-canvas);
  color: var(--xy-ink);
  font-family: var(--xy-font-ui);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(46, 107, 255, 0.18); }

:focus-visible {
  outline: 2px solid var(--xy-cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

a { text-decoration: none; }
a:hover { text-decoration: none; }

code, .xy-mono {
  font-family: var(--xy-font-mono);
  font-size: 0.92em;
}

/* ---------- Bootstrap 组件重塑 ---------- */

.btn {
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.5rem 1rem;
  transition: background-color 0.15s ease, border-color 0.15s ease,
              box-shadow 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--xy-electric);
  border-color: var(--xy-electric);
  box-shadow: 0 1px 3px rgba(46, 107, 255, 0.25);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--xy-electric-600);
  border-color: var(--xy-electric-600);
}
.btn-outline-primary {
  color: var(--xy-electric);
  border-color: var(--xy-electric);
}
.btn-outline-primary:hover {
  background: var(--xy-electric-050);
  border-color: var(--xy-electric);
  color: var(--xy-electric-600);
}
.btn-sm { padding: 0.35rem 0.7rem; font-size: 13px; }
.btn-lg { padding: 0.7rem 1.4rem; font-size: 15px; }

.btn-success { background: var(--xy-success); border-color: var(--xy-success); color: #fff; }
.btn-success:hover, .btn-success:focus { background: #178A5F; border-color: #178A5F; color: #fff; }
.btn-warning { background: var(--xy-warning); border-color: var(--xy-warning); color: #3B2A05; }
.btn-warning:hover, .btn-warning:focus { background: #D8932F; border-color: #D8932F; color: #2E2103; }
.btn-info { background: #0FAFD9; border-color: #0FAFD9; color: #fff; }
.btn-info:hover, .btn-info:focus { background: #0B93B8; border-color: #0B93B8; color: #fff; }
.btn-danger { background: var(--xy-danger); border-color: var(--xy-danger); }
.btn-danger:hover, .btn-danger:focus { background: #C93B40; border-color: #C93B40; }
.btn-dark { background: var(--xy-navy); border-color: var(--xy-navy); }
.btn-dark:hover, .btn-dark:focus { background: var(--xy-navy-800); border-color: var(--xy-navy-800); }
.btn-secondary { background: var(--xy-muted); border-color: var(--xy-muted); }
.btn-secondary:hover, .btn-secondary:focus { background: #48586E; border-color: #48586E; }

.card {
  border: 1px solid var(--xy-border);
  border-radius: var(--xy-radius-lg);
  box-shadow: var(--xy-shadow-sm);
  background: var(--xy-card);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--xy-border);
  font-weight: 600;
  padding: 0.9rem 1.25rem;
}
.card-title { color: var(--xy-ink); }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--xy-ink);
  margin-bottom: 0.4rem;
}
.form-text { color: var(--xy-muted); }
.form-control, .form-select {
  border-color: var(--xy-border-strong);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 14px;
  color: var(--xy-ink);
}
.form-control:focus, .form-select:focus {
  border-color: var(--xy-electric);
  box-shadow: 0 0 0 3px rgba(46, 107, 255, 0.14);
}
.form-control::placeholder { color: var(--xy-faint); }
.input-group-text {
  background: #F7FAFD;
  border-color: var(--xy-border-strong);
  color: var(--xy-muted);
  font-family: var(--xy-font-mono);
  font-size: 12px;
}
.form-check-input:checked {
  background-color: var(--xy-electric);
  border-color: var(--xy-electric);
}
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(46, 107, 255, 0.14); }
.form-switch .form-check-input:checked {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(46, 107, 255, 0.035);
  color: var(--xy-ink);
  font-size: 13.5px;
  vertical-align: middle;
}
.table > :not(caption) > * > * {
  padding: 0.7rem 0.9rem;
  border-bottom-color: var(--xy-border);
}
.table thead th {
  background: #F7FAFD;
  color: var(--xy-muted);
  font-family: var(--xy-font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--xy-border-strong);
  white-space: nowrap;
}
.table thead th:first-child { border-top-left-radius: 8px; }
.table thead th:last-child { border-top-right-radius: 8px; }

.nav-tabs {
  border-bottom: 1px solid var(--xy-border-strong);
  gap: 0.25rem;
}
.nav-tabs .nav-link {
  border: none;
  color: var(--xy-muted);
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 8px 8px 0 0;
  position: relative;
}
.nav-tabs .nav-link:hover { color: var(--xy-ink); }
.nav-tabs .nav-link.active {
  color: var(--xy-electric);
  background: transparent;
}
.nav-tabs .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: -1px;
  height: 2px;
  background: var(--xy-gradient);
  border-radius: 2px;
}

.alert {
  border: 1px solid;
  border-radius: var(--xy-radius);
  font-size: 13.5px;
  padding: 0.7rem 1rem;
}
.alert-danger { border-color: rgba(229, 72, 77, 0.35); background: #FDF1F2; color: #A62B30; }
.alert-success { border-color: rgba(31, 164, 113, 0.35); background: #EFFAF5; color: #146B49; }
.alert-warning { border-color: rgba(233, 162, 59, 0.4); background: #FEFAEF; color: #8A5B12; }
.alert-info { border-color: rgba(0, 192, 240, 0.35); background: #EDFBFF; color: #0B6E87; }

.badge {
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  padding: 0.4em 0.7em;
  border-radius: 6px;
}

.modal-content {
  border: none;
  border-radius: var(--xy-radius-lg);
  box-shadow: 0 12px 40px rgba(11, 31, 61, 0.18);
}
.modal-header { border-bottom: 1px solid var(--xy-border); padding: 1rem 1.25rem; }
.modal-footer { border-top: 1px solid var(--xy-border); padding: 0.8rem 1.25rem; }

.dropdown-menu {
  border: 1px solid var(--xy-border);
  border-radius: var(--xy-radius);
  box-shadow: var(--xy-shadow-md);
  padding: 0.4rem;
}
.dropdown-item {
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
  font-size: 13.5px;
  color: var(--xy-ink);
}
.dropdown-item:hover, .dropdown-item:focus { background: var(--xy-electric-050); color: var(--xy-electric-600); }

.list-group { border-radius: var(--xy-radius); }
.list-group-item { border-color: var(--xy-border); padding: 0.75rem 1rem; }

.progress { background: var(--xy-electric-050); border-radius: 6px; }
.progress-bar { background: var(--xy-gradient); }

.toast {
  border: 1px solid var(--xy-border);
  border-radius: var(--xy-radius);
  box-shadow: var(--xy-shadow-md);
}

/* ---------- 控制台外壳: 侧栏 + 工作区 ---------- */

.xy-shell { display: flex; min-height: 100vh; }

.xy-sidebar {
  flex: 0 0 248px;
  width: 248px;
  background: linear-gradient(180deg, var(--xy-navy) 0%, var(--xy-navy-900) 100%);
  color: #D6E2F5;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 100;
}
.xy-sidebar::-webkit-scrollbar { width: 4px; }
.xy-sidebar::-webkit-scrollbar-thumb { background: var(--xy-navy-700); border-radius: 4px; }

.xy-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.25rem 1rem 1.15rem;
}
.xy-brand img { display: block; }
/* 横版 logo(宽高比 3.18)撑满侧栏可用宽度,不再锁死 26px 高度导致只占约四成 */
.xy-brand img.wide {
  display: block;
  width: 100%;
  height: auto;
  max-width: 216px;
}
.xy-brand img.narrow { display: none; height: 30px; width: auto; }

.xy-nav { flex: 1; padding: 0.4rem 0.75rem 1.25rem; }

.xy-nav-group { margin-top: 0.9rem; }
.xy-nav-group-title {
  font-family: var(--xy-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4E6A9C;
  padding: 0.3rem 0.75rem 0.4rem;
  user-select: none;
}

.xy-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  margin: 1px 0;
  border-radius: 8px;
  color: #A9BDE0;
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.xy-nav-item i { font-size: 15px; width: 18px; text-align: center; }
.xy-nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #FFFFFF; }
.xy-nav-item.active {
  background: rgba(46, 107, 255, 0.16);
  color: #FFFFFF;
  font-weight: 600;
}
/* 签名: 激活项左侧 2px 渐变弦线 */
.xy-nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 22px;
  border-radius: 2px;
  background: var(--xy-gradient);
}

.xy-sidebar-footer {
  padding: 0.9rem 1.1rem 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.xy-tenant-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  margin-bottom: 0.55rem;
}
.xy-tenant-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--xy-cyan);
  box-shadow: 0 0 6px rgba(0, 192, 240, 0.8);
  flex: none;
}
.xy-tenant-chip code {
  color: #FFFFFF;
  font-size: 12px;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xy-sidebar-footer .btn {
  font-size: 12.5px;
  font-weight: 500;
  color: #A9BDE0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.xy-sidebar-footer .btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.xy-main {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.25rem 3rem;
}

/* 页头 */
.xy-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.xy-eyebrow {
  font-family: var(--xy-font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--xy-electric);
  margin-bottom: 0.35rem;
}
.xy-page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--xy-ink);
  margin: 0;
  letter-spacing: 0.01em;
}
.xy-page-subtitle {
  font-size: 13.5px;
  color: var(--xy-muted);
  margin-top: 0.3rem;
}
/* 签名: 页头渐变弦线 */
.xy-string {
  width: 44px;
  height: 2px;
  border-radius: 2px;
  background: var(--xy-gradient);
  margin-top: 0.55rem;
}
.xy-page-actions { display: flex; align-items: center; gap: 0.5rem; padding-bottom: 0.15rem; }

/* 头像 */
.xy-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--xy-electric), var(--xy-cyan));
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.xy-avatar-sm { width: 28px; height: 28px; border-radius: 7px; font-size: 12px; }

/* 状态点 */
.xy-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 12.5px;
  font-weight: 600;
  padding: 0.18rem 0.6rem;
  border-radius: 20px;
}
.xy-status-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.xy-status-active, .status-active {
  color: var(--xy-success); background: rgba(31, 164, 113, 0.1);
  display: inline-flex; align-items: center; padding: 0.18rem 0.6rem; border-radius: 20px;
}
.xy-status-blocked, .status-blocked {
  color: var(--xy-danger); background: rgba(229, 72, 77, 0.1);
  display: inline-flex; align-items: center; padding: 0.18rem 0.6rem; border-radius: 20px;
}
.xy-status-idle { color: var(--xy-faint); background: rgba(138, 153, 179, 0.12); }
.status-active::before, .status-blocked::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 0.4rem;
}

/* 用户头像(img.avatar 由 JS 渲染) */
img.avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--xy-border);
  background: var(--xy-electric-050);
}

/* 面板/区块标题 */
.xy-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--xy-ink);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.xy-section-title::before {
  content: "";
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: var(--xy-gradient);
}

/* 兼容旧页自定义类 */
.section-title {
  color: var(--xy-ink);
  font-size: 15px;
  font-weight: 700;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--xy-border);
  margin-bottom: 1.25rem;
}
.main-card {
  border: 1px solid var(--xy-border);
  border-radius: var(--xy-radius-lg);
  box-shadow: var(--xy-shadow-sm);
  background: var(--xy-card);
}
.keyword-card {
  border: 1px solid var(--xy-border);
  border-radius: var(--xy-radius-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.keyword-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--xy-shadow-md);
}

/* 自定义回复页: 用户选择下拉 + 规则网格 */
.user-select-dropdown .dropdown-menu {
  border-radius: var(--xy-radius);
  box-shadow: var(--xy-shadow-md);
  max-height: 300px;
  overflow-y: auto;
}
.user-select-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.6rem 0.8rem;
}
.user-select-dropdown .dropdown-item img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.user-select-dropdown .dropdown-item .user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.user-select-dropdown .dropdown-item .user-nickname { font-weight: 600; }
.user-select-dropdown .dropdown-item .user-id {
  font-family: var(--xy-font-mono);
  font-size: 0.8em;
  color: var(--xy-muted);
}
#user-select-button {
  display: flex;
  align-items: center;
  gap: 12px;
}
#user-select-button img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

#replies-list-container .list-group-item {
  display: grid;
  grid-template-columns: 1.5fr 3fr 1.5fr 1.5fr 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-left: none;
  border-right: none;
}
.reply-keyword {
  font-weight: 700;
  color: var(--xy-electric);
  word-break: break-all;
}
.reply-content { color: var(--xy-ink); word-break: break-all; }
.reply-actions { text-align: right; }
@media (max-width: 768px) {
  #replies-list-container .list-group-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    text-align: center;
    border-bottom: 1px solid var(--xy-border);
  }
  .reply-actions { text-align: center; }
}

/* MCP 模型配置页: 用户配置面板展开动画 */
.placeholder-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--xy-electric-050);
  color: var(--xy-faint);
  border-radius: 50%;
  width: 36px;
  height: 36px;
}
#user-config-card-inner {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, max-height 0.5s ease;
  visibility: hidden;
}
#user-config-card-inner.visible {
  opacity: 1;
  max-height: 1000px;
  visibility: visible;
  margin-top: 1.5rem;
}

/* MCP 权限页: 服务卡片 + 用户权限列表 */
#mcp-list-container .card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#mcp-list-container .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--xy-shadow-md);
}
.user-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem;
  border-radius: 8px;
}
.user-list-item:hover { background: #F7FAFD; }

/* 全屏加载遮罩(JS 显隐) */
.loader {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(244, 247, 251, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1056;
}
.loader .spinner-border {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3.5rem;
  height: 3.5rem;
  margin: -1.75rem 0 0 -1.75rem;
}

/* ---------- 登录页 ---------- */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background:
    radial-gradient(ellipse 70% 55% at 50% -10%, rgba(46, 107, 255, 0.28), transparent 60%),
    radial-gradient(ellipse 55% 45% at 88% 105%, rgba(0, 192, 240, 0.16), transparent 60%),
    linear-gradient(180deg, var(--xy-navy) 0%, var(--xy-navy-900) 100%);
  position: relative;
}
/* 网格微纹理 */
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  padding: 2.6rem 2.4rem 2.4rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 64px rgba(1, 14, 38, 0.55);
}

.login-logo { text-align: center; margin-bottom: 0.9rem; }
.login-logo img { height: 46px; width: auto; }

/* 签名: 拨弦动画 */
.login-string {
  width: 96px;
  height: 2px;
  border-radius: 2px;
  background: var(--xy-gradient);
  margin: 0.9rem auto 1.7rem;
  transform-origin: center;
  animation: xy-pluck 1.25s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
  box-shadow: 0 0 12px rgba(0, 192, 240, 0.45);
}
@keyframes xy-pluck {
  0%   { transform: scaleX(0.1); opacity: 0.3; }
  55%  { transform: scaleX(1.08); opacity: 1; }
  78%  { transform: scaleX(0.93); }
  100% { transform: scaleX(1); }
}

.login-subtitle {
  text-align: center;
  color: #9FB4D8;
  font-size: 13.5px;
  margin: -0.6rem 0 0;
  letter-spacing: 0.03em;
}

.login-card .form-label { color: #C7D6EF; }
.login-card .form-control {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}
.login-card .form-control:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--xy-cyan);
  box-shadow: 0 0 0 3px rgba(0, 192, 240, 0.18);
}
.login-card .form-control::placeholder { color: #6480AC; }
.login-card .btn-primary { width: 100%; padding: 0.65rem; font-size: 15px; }

.login-error {
  border-radius: 8px;
  background: rgba(229, 72, 77, 0.14);
  border: 1px solid rgba(229, 72, 77, 0.45);
  color: #FFB3B6;
  font-size: 13px;
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-foot {
  margin-top: 1.6rem;
  text-align: center;
  font-family: var(--xy-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: #4E6A9C;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1200px) {
  .xy-sidebar { flex-basis: 76px; width: 76px; }
  .xy-brand { justify-content: center; padding: 1.15rem 0.6rem 1.05rem; }
  .xy-brand img.wide { display: none; }
  .xy-brand img.narrow { display: block; height: 26px; width: auto; }
  .xy-nav-group-title, .xy-nav-item .xy-nav-label, .xy-tenant-chip code {
    display: none;
  }
  .xy-nav-item { justify-content: center; padding: 0.55rem; }
  .xy-nav-item i { width: auto; font-size: 17px; }
  .xy-tenant-chip { justify-content: center; padding: 0.45rem; }
  .xy-sidebar-footer { padding: 0.8rem 0.6rem 0.9rem; }
  .xy-sidebar-footer .btn { justify-content: center; padding: 0.45rem; }
  .xy-sidebar-footer .btn .xy-nav-label { display: none; }
  .xy-main { padding: 1.6rem 1.4rem 2.5rem; }
}

/* ---------- 动效可及性 ---------- */

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