/* 罗源航盛矿业有限公司经营管理系统 —— 统一平台样式
 *
 * 设计令牌（颜色 / 圆角 / 阴影 / 字体）统一来自 css/new-ui.css，
 * 与销售管理系统、采购管理系统、固定资产维保记录系统完全一致；
 * 本文件只保留「平台特有」的组件：门户卡片、运行控制台、权限点、统一登录页等。
 */
:root {
  /* 兼容别名：历史模板中的 var(--hs-*) 全部指向共享设计令牌 */
  --hs-brand: var(--brand-600);
  --hs-brand-600: var(--brand);
  --hs-brand-50: var(--brand-50);
  --hs-ink-900: var(--ink-900);
  --hs-ink-700: var(--ink-700);
  --hs-ink-500: var(--ink-500);
  --hs-ink-300: var(--ink-300);
  --hs-line: var(--ink-200);
  --hs-surface: var(--surface);
  --hs-bg: var(--bg);
  --hs-ok: var(--ok-text);
  --hs-warn: var(--warn-text);
  --hs-danger: var(--danger-text);
  --hs-info: var(--info-text);
}
a { text-decoration: none; }

/* ---------- 页脚 ---------- */
.hs-footer { padding: 16px 10px 18px; text-align: center; color: var(--ink-500); font-size: .76rem;
  border-top: 1px solid var(--ink-200); margin-top: 24px; line-height: 1.7; }
.hs-footer .hs-copyright { color: var(--ink-700); font-weight: 600; }

/* ---------- 卡片 ---------- */
.hs-card { background: var(--surface); border: 1px solid var(--ink-200); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 16px 18px; }
.hs-card + .hs-card { margin-top: 14px; }
.hs-card-title { font-size: .95rem; font-weight: 600; color: var(--ink-900);
  display: flex; align-items: center; gap: 8px; margin: -16px -18px 14px; padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--ink-100); }
.hs-card-title i { color: var(--brand); }
.hs-card-title .hs-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 统计卡（与销售管理系统同一视觉：左数值右图标） ---------- */
.hs-stat { display: flex; align-items: center; gap: 14px; background: var(--surface);
  border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 16px 18px; height: 100%;
  box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease; }
.hs-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.hs-stat > i { order: 2; margin-left: auto; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  background: var(--brand-50); color: var(--brand); }
.hs-stat > i.hs-tone-info { background: var(--info-bg); color: var(--info-text); }
.hs-stat > i.hs-tone-ok { background: var(--ok-bg); color: var(--ok-text); }
.hs-stat > i.hs-tone-warn { background: var(--warn-bg); color: var(--warn-text); }
.hs-stat > i.hs-tone-danger { background: var(--danger-bg); color: var(--danger-text); }
.hs-stat .hs-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--ink-900); line-height: 1.15; }
.hs-stat .hs-stat-label { font-size: .8rem; color: var(--ink-500); margin-top: 2px; }
.hs-stat.hs-tone-danger { border-color: var(--danger-border); }
.hs-stat.hs-tone-danger > i { background: var(--danger-bg); color: var(--danger-text); }
.hs-stat.hs-tone-danger .hs-stat-value { color: var(--danger-text); }

.hs-tone-ok { color: var(--ok-text); } .hs-tone-warn { color: var(--warn-text); }
.hs-tone-danger { color: var(--danger-text); } .hs-tone-info { color: var(--info-text); }

/* ---------- 门户：业务系统卡片 ---------- */
.hs-module-card { position: relative; overflow: hidden; background: var(--surface);
  border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 16px 18px; height: 100%;
  box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease; }
.hs-module-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.hs-module-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--hs-accent, var(--brand)); }
.hs-module-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hs-module-head i { font-size: 1.3rem; color: var(--hs-accent, var(--brand)); }
.hs-module-head b { font-size: 1rem; color: var(--ink-900); }
.hs-module-desc { font-size: .82rem; color: var(--ink-500); min-height: 34px; }

/* ---------- 徽标 / 圆点 ---------- */
.hs-pill { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; padding: 3px 10px;
  border-radius: 999px; border: 1px solid var(--ink-200); background: var(--surface); color: var(--ink-500); }
.hs-pill.is-ok { color: var(--ok-text); border-color: var(--ok-border); background: var(--ok-bg); }
.hs-pill.is-off { color: var(--danger-text); border-color: var(--danger-border); background: var(--danger-bg); }
.hs-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-300); display: inline-block; }
.hs-dot.is-ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
.hs-dot.is-off { background: var(--danger); }
.hs-badge-sys { font-size: .7rem; padding: 2px 7px; border-radius: 6px; color: #fff;
  margin-right: 3px; display: inline-block; }

/* ---------- 表格 / 表单 / 空状态 ---------- */
table.hs-table { font-size: .88rem; margin-bottom: 0; }
.hs-table td { vertical-align: middle; }
.hs-empty { text-align: center; color: var(--ink-500); padding: 34px 10px; }
.hs-empty i { font-size: 2rem; display: block; margin-bottom: 8px; opacity: .5; }
.hs-form label { font-size: .84rem; font-weight: 600; color: var(--ink-700); margin-bottom: 4px; }
.hs-form .form-control, .hs-form .form-select { font-size: .88rem; }
.hs-help { font-size: .76rem; color: var(--ink-500); }

/* ---------- 角色权限 ---------- */
.hs-perm-group { border: 1px solid var(--ink-200); border-radius: var(--radius-sm); padding: 10px 12px;
  margin-bottom: 10px; background: var(--surface); }
.hs-perm-group-head { display: flex; align-items: center; gap: 8px; font-weight: 600;
  font-size: .88rem; margin-bottom: 6px; color: var(--ink-900); }
.hs-perm-group-head .form-check-input { margin: 0; }
.hs-perm-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 4px 10px; }
.hs-perm-items .form-check { font-size: .84rem; margin: 0; }
.hs-sys-head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 14px 0 6px; }

/* ---------- 运行控制台 ---------- */
.hs-console-card .hs-console-meta { font-size: .8rem; color: var(--ink-500); }
.hs-log { background: #0b1220; color: #cbd5e1; font-family: Consolas, "Courier New", monospace;
  font-size: .76rem; border-radius: var(--radius-sm); padding: 10px 12px; max-height: 320px;
  overflow: auto; white-space: pre-wrap; word-break: break-all; }

/* ---------- 统一登录 / 提示页 ---------- */
.hs-brand-icon { width: 38px; height: 38px; border-radius: 11px; flex: 0 0 38px;
  background: linear-gradient(135deg, #2563eb, #1e40af); color: #fff; display: flex;
  align-items: center; justify-content: center; font-size: 1.1rem; }
.login-page { min-height: 100vh; display: flex; background: var(--bg); }
.login-left { flex: 1 1 52%; background: linear-gradient(150deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
  color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 56px 7%;
  position: relative; }
.login-corner { position: absolute; left: 7%; bottom: 22px; color: rgba(255, 255, 255, .72);
  font-size: .78rem; font-weight: 600; letter-spacing: .02em; }
.login-left h1 { font-size: 1.9rem; font-weight: 700; line-height: 1.32; margin: 20px 0 12px; color: #fff; }
.login-left p { color: #cbd5e1; max-width: 520px; font-size: .92rem; }
.login-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 6px 14px; font-size: .8rem;
  width: fit-content; }
.login-features { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.login-feature { flex: 1 1 150px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 12px 14px; }
.login-feature i { font-size: 1.2rem; color: #93c5fd; }
.login-feature div { font-size: .82rem; margin-top: 6px; color: #e2e8f0; }
.login-right { flex: 1 1 48%; display: flex; align-items: center; justify-content: center; padding: 34px 22px; }
.login-card { width: 100%; max-width: 420px; }
.login-card .card { border: 1px solid var(--ink-200); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); background: var(--surface); }
.login-card .card-body { padding: 28px 26px; }
.login-title { font-size: 1.25rem; font-weight: 700; color: var(--ink-900); }
.login-sub { color: var(--ink-500); font-size: .86rem; margin: 6px 0 20px; }
.login-footer { text-align: center; font-size: .78rem; color: var(--ink-500);
  padding: 18px 10px 6px; line-height: 1.8; }
.login-footer .hs-copyright { color: var(--ink-700); font-weight: 600; }
.hs-intranet { display: inline-flex; align-items: center; gap: 6px; color: var(--danger-text);
  border: 1px dashed var(--danger-border); background: var(--danger-bg); border-radius: 8px;
  padding: 4px 10px; font-size: .76rem; font-weight: 600; }
.hs-captcha { display: flex; align-items: center; gap: 8px; }
.hs-captcha .hs-captcha-text { flex: 1 1 auto; background: var(--brand-50); border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm); padding: 8px 12px; font-weight: 600; letter-spacing: .08em;
  text-align: center; user-select: none; }

/* ---------- 响应式 / 打印 ---------- */
/* ---------- 工作台内嵌版式（?embed=1） ----------
   业务系统工作台的「用户管理 / 角色权限」在统一模式下跳转到平台页面；
   内嵌打开时平台不渲染自己的顶栏与侧边栏，只显示内容区，避免「画中画」。 */
body.platform-embed #pageContentWrap { margin-left: 0 !important;
  padding: 14px 18px 22px !important; }
body.platform-embed .page-head { margin-top: 0; }
body.platform-embed .hs-footer { padding-top: 10px; }

@media (max-width: 991.98px) {
  .hs-log { max-height: 46vh; }
}
@media print {
  .app-topbar, .app-sidebar-v2, .hs-footer, .hs-no-print { display: none !important; }
  #pageContentWrap { margin-left: 0 !important; padding: 0 !important; }
}
