@charset "UTF-8";

:root {
  color-scheme: light;
  --bg: #f1f5fb;
  --surface: #ffffff;
  --surface-soft: #f6f9fe;
  --ink: #13233a;
  --muted: #566982;
  --border: #dce5f2;
  --accent: #2563eb;
  --accent-ink: #1d4ed8;
  --accent-soft: #e6effe;
  --success: #0d8259;
  --success-soft: #e1f6ed;
  --warn: #b85d0c;
  --warn-soft: #fff4e4;
  --danger: #c43240;
  --danger-soft: #fdebec;
  --shadow: 0 1px 2px rgba(15, 37, 68, .05), 0 10px 28px rgba(30, 58, 102, .06);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: radial-gradient(ellipse at 0% 0%, #dbeafe70, transparent 42%),
    radial-gradient(ellipse at 100% 0%, #e0f2fe60, transparent 38%),
    linear-gradient(180deg, #f3f6fc 0%, #eef3fa 100%);
}
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--accent-ink);
  margin-bottom: 6px;
}

/* 顶部 36px 极简切换细条 */
.xb-hub-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  z-index: 95;
  background: rgba(248, 250, 253, .88);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid rgba(186, 203, 227, .55);
  font-size: 12px;
}
.xb-hub-bar-inner {
  height: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.xb-hub-bar-left, .xb-hub-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.xb-hub-bar-left { overflow-x: auto; scrollbar-width: none; }
.xb-hub-bar-left::-webkit-scrollbar { display: none; }
.xb-hub-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--ink);
  padding: 3px 8px 3px 4px;
  border-radius: 7px;
  white-space: nowrap;
  flex-shrink: 0;
}
.xb-hub-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.xb-hub-links {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.xb-hub-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.xb-hub-pill:hover { background: rgba(37, 99, 235, .08); color: var(--ink); }
.xb-hub-pill.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 650;
}
.xb-hub-user {
  color: var(--muted);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xb-hub-preview {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--warn);
  background: var(--warn-soft);
}
.xb-hub-action {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 3px 7px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.xb-hub-action:hover { background: rgba(15, 37, 68, .06); color: var(--ink); }

/* 登录页 */
.login-shell {
  min-height: 100dvh;
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 20px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 28px;
  align-items: center;
}
.login-story {
  padding: 38px 36px;
  border-radius: 26px;
  background: linear-gradient(145deg, #dce9fd, #eef4fd 55%, #e3f2fa);
  border: 1px solid #c9dcf8;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-row strong { display: block; font-size: 18px; }
.brand-row small { display: block; font-size: 10px; letter-spacing: 1px; color: var(--muted); }
.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
.story-copy h1 { font-size: 34px; line-height: 1.2; letter-spacing: -.5px; margin-bottom: 14px; }
.story-copy p { color: var(--muted); line-height: 1.75; }
.story-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.story-pills span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(255, 255, 255, .95);
  font-size: 12px;
  font-weight: 550;
  color: var(--ink);
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 34px 30px;
  box-shadow: var(--shadow);
}
.login-card h2 { font-size: 22px; margin-bottom: 6px; }
.login-card > p { font-size: 13px; margin-bottom: 22px; }
.login-card form, .hub-dialog form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 550; color: var(--ink); }
input[type="text"], input[type="password"], select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}
input:focus, select:focus { outline: 2px solid #93c5fd; border-color: var(--accent); }
.hint { display: block; margin-top: 18px; color: var(--muted); font-size: 11px; text-align: center; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}
.btn:hover { background: var(--surface-soft); border-color: #b8cde8; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); }
.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.full { width: 100%; padding: 11px 16px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.error { color: var(--danger); font-size: 12px; min-height: 16px; }

/* 主工作区 */
.hub-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 22px 48px;
}
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.page-head h1 { font-size: 26px; letter-spacing: -.4px; margin-bottom: 6px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 启动卡片 */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .15s, border-color .15s;
}
.module-card:hover { transform: translateY(-2px); border-color: #93c5fd; }
.module-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.module-card h3 { font-size: 18px; }
.module-card p { font-size: 13px; color: var(--muted); line-height: 1.6; flex: 1; }
.module-card-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid #eef2f8; font-size: 12px; color: var(--accent-ink); font-weight: 600; }

/* 权限后台 */
.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.status-chip {
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.status-chip.ok { border-color: #a3dfc5; color: var(--success); background: var(--success-soft); }
.status-chip.warn { border-color: #f2cf96; color: var(--warn); background: var(--warn-soft); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}
.card-head {
  padding: 18px 20px;
  border-bottom: 1px solid #eef2f8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-head h2 { font-size: 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 13px 16px;
  border-bottom: 1px solid #eef2f8;
  vertical-align: middle;
}
.right { text-align: right; white-space: nowrap; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-soft);
  color: var(--muted);
  border: 1px solid var(--border);
}
.badge.ok { background: var(--success-soft); color: var(--success); border-color: #a3dfc5; }
.badge.blue { background: var(--accent-soft); color: var(--accent-ink); border-color: #b7cffc; }
.badge.off { background: var(--danger-soft); color: var(--danger); border-color: #f4b8bf; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* 弹窗 */
.hub-dialog {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 26px;
  width: 560px;
  max-width: calc(100vw - 24px);
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 24px 70px rgba(15, 37, 68, .22);
}
.hub-dialog::backdrop { background: rgba(13, 29, 51, .45); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.module-box {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  display: grid;
  gap: 10px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
}
.dept-checks { display: flex; flex-wrap: wrap; gap: 10px; }
.dept-checks label { display: inline-flex; flex-direction: row; align-items: center; gap: 5px; font-weight: 450; font-size: 12px; }
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  z-index: 120;
  max-width: 90vw;
}

@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; padding-top: 20px; }
  .login-story { padding: 24px; gap: 18px; }
  .story-copy h1 { font-size: 26px; }
  .row-2 { grid-template-columns: 1fr; }
  .xb-hub-user { display: none; }
}
