/* SoftHub 公共样式 — 纯色调，禁止渐变 */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: #f0f2f5; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; color: #222; font-size: 14px; }

a { color: #1677ff; text-decoration: none; }
a:hover { color: #4096ff; }
button { font-family: inherit; }
code { background: #f5f5f5; padding: 1px 6px; border-radius: 3px; font-size: 12px; color: #c41d7f; }
pre.sh-code { background: #1f1f1f; color: #f8f8f2; padding: 14px 18px; border-radius: 4px; overflow-x: auto; font-size: 12.5px; line-height: 1.6; margin: 8px 0; }

/* ===== 登录 / 注册页 ===== */
body.sh-auth {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: #f0f2f5;
}
.auth-card {
  width: 420px; background: #fff; border: 1px solid #f0f0f0; border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.auth-card .hd { padding: 28px 32px 18px; border-bottom: 1px solid #f0f0f0; text-align: center; }
.auth-card .hd h1 { margin: 0; color: #1677ff; font-size: 24px; font-weight: 600; }
.auth-card .hd p  { margin: 6px 0 0; color: #999; font-size: 13px; }
.auth-card .bd { padding: 24px 32px 28px; }
.auth-card .row { margin-bottom: 16px; }
.auth-card label { display: block; font-size: 13px; color: #333; margin-bottom: 6px; }
.auth-card input[type=text], .auth-card input[type=password] {
  width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; outline: none;
}
.auth-card input:focus { border-color: #1677ff; }
.auth-card .code-row { display: flex; gap: 8px; }
.auth-card .code-row input { flex: 1; }
.auth-card .code-row button {
  background: #f5f5f5; border: 1px solid #d9d9d9; color: #333; padding: 0 14px; border-radius: 4px; cursor: pointer; white-space: nowrap;
}
.auth-card .code-row button:hover { background: #1677ff; color: #fff; border-color: #1677ff; }
.auth-card .code-row button:disabled { background: #f0f0f0; color: #bbb; cursor: not-allowed; }
.btn-primary {
  width: 100%; background: #1677ff; color: #fff; border: 0; padding: 10px 16px; border-radius: 4px; font-size: 15px; cursor: pointer; margin-top: 6px;
}
.btn-primary:hover { background: #4096ff; }
.auth-card .alt { text-align: center; margin: 18px 0 0; font-size: 13px; }

/* ===== 后台布局（侧栏 + 顶栏 + 内容） ===== */
.sh-layout { display: flex; min-height: 100vh; }
.sh-side {
  width: 220px; background: #001529; color: #fff;
  position: fixed; top: 0; left: 0; bottom: 0;
}
.sh-side .logo { padding: 22px 24px; color: #fff; font-size: 18px; font-weight: 600; border-bottom: 1px solid #1d2733; }
.sh-side .menu { list-style: none; padding: 12px 0; margin: 0; }
.sh-side .menu li a {
  display: block; padding: 12px 24px; color: #a6adb4; font-size: 14px;
}
.sh-side .menu li a:hover { background: #1f2d3d; color: #fff; }
.sh-side .menu li a.on { background: #1677ff; color: #fff; }

.sh-main { flex: 1; margin-left: 220px; display: flex; flex-direction: column; }
.sh-top {
  background: #fff; height: 56px; padding: 0 24px; border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; justify-content: space-between;
}
.sh-top .user { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #555; }
.sh-top .user .tag { padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.sh-top .user .logout {
  background: #fff; border: 1px solid #d9d9d9; color: #555; padding: 4px 14px; border-radius: 4px; cursor: pointer;
}
.sh-top .user .logout:hover { border-color: #1677ff; color: #1677ff; }
.sh-content { flex: 1; padding: 24px; }

/* 卡片 / 工具栏 */
.sh-card { background: #fff; border: 1px solid #f0f0f0; border-radius: 6px; padding: 20px; margin-bottom: 16px; }
.sh-card h3 { margin: 0 0 14px; font-size: 16px; color: #333; }
.sh-toolbar {
  background: #fff; border: 1px solid #f0f0f0; border-radius: 6px; padding: 16px 20px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.sh-toolbar h2 { margin: 0 20px 0 0; font-size: 18px; }
.sh-toolbar input.sh-input,
.sh-toolbar select.sh-input {
  padding: 6px 11px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; outline: none;
}
.sh-toolbar button {
  background: #1677ff; color: #fff; border: 0; padding: 6px 16px; border-radius: 4px; cursor: pointer;
}
.sh-toolbar button:hover { background: #4096ff; }
.sh-toolbar button.btn-sec { background: #fff; color: #333; border: 1px solid #d9d9d9; }
.sh-toolbar button.btn-sec:hover { border-color: #1677ff; color: #1677ff; }
.sh-toolbar button.btn-danger { background: #ff4d4f; }
.sh-toolbar button.btn-danger:hover { background: #ff7875; }

/* 表格（用 antd 自身的 .ant-table 即可） */
.sh-empty { padding: 60px 0; text-align: center; color: #bbb; }

/* 统计卡片 */
.sh-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.sh-stat { background: #fff; border: 1px solid #f0f0f0; border-radius: 6px; padding: 18px; }
.sh-stat .label { color: #888; font-size: 13px; margin-bottom: 8px; }
.sh-stat .value { color: #1677ff; font-size: 26px; font-weight: 600; }

/* 通用 Tag / Button */
.sh-tag       { display:inline-block; padding:1px 8px; border-radius:10px; font-size:12px; background:#f0f0f0; color:#555; }
.sh-tag-green { background:#f6ffed; color:#389e0d; border:1px solid #b7eb8f; }
.sh-tag-red   { background:#fff2f0; color:#cf1322; border:1px solid #ffccc7; }
.sh-tag-blue  { background:#e6f4ff; color:#1677ff; border:1px solid #91caff; }
.sh-tag-orange{ background:#fff7e6; color:#d46b08; border:1px solid #ffd591; }

.sh-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }

/* 模态遮罩 */
.sh-modal-mask {
  position: fixed; top:0; left:0; right:0; bottom:0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.sh-modal {
  background: #fff; border-radius: 6px; width: 520px; max-width: 92%;
}
.sh-modal-lg { width: 760px; }
.sh-modal-hd { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.sh-modal-hd h3 { margin: 0; font-size: 16px; }
.sh-modal-bd { padding: 20px; max-height: 70vh; overflow-y: auto; }
.sh-modal-ft { padding: 12px 20px; border-top: 1px solid #f0f0f0; text-align: right; }
.sh-modal-ft button { margin-left: 8px; }
.sh-close { background: none; border: 0; font-size: 20px; color: #888; cursor: pointer; }

.sh-form-row { margin-bottom: 14px; }
.sh-form-row label { display: block; font-size: 13px; color: #333; margin-bottom: 5px; }
.sh-form-row label .req { color: #ff4d4f; margin-left: 2px; }
.sh-form-row input.sh-in, .sh-form-row textarea.sh-in, .sh-form-row select.sh-in {
  width: 100%; padding: 6px 11px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; outline: none; font-family: inherit;
}
.sh-form-row input.sh-in:focus, .sh-form-row textarea.sh-in:focus, .sh-form-row select.sh-in:focus { border-color: #1677ff; }
.sh-form-row .err { color: #ff4d4f; font-size: 12px; margin-top: 4px; }