/* ══════════════════════════════════════════════════════
   杉越 ERP — SAP Fiori 风格全局样式
   主色：SAP 标准蓝 #0070F2
   背景：浅灰 #F5F6F7 / 白色卡片
   ══════════════════════════════════════════════════════ */

/* ── CSS 变量 ──────────────────────────────────────────── */
:root {
  --sap-blue:       #0070F2;
  --sap-blue-dark:  #0654A4;
  --sap-blue-light: #E8F3FF;
  --sap-blue-hover: #0064D9;

  --bg:             #F5F6F7;
  --surface:        #FFFFFF;
  --surface2:       #F0F2F5;
  --border:         #D9DBDD;
  --border-light:   #EDEFF2;

  --text:           #1D2D3E;
  --text-mute:      #6A6D70;
  --text-light:     #89919A;

  --green:          #188469;
  --green-bg:       #E5F8F4;
  --orange:         #E76500;
  --orange-bg:      #FEF4EA;
  --red:            #BB0000;
  --red-bg:         #FFEAEA;
  --blue-bg:        #E8F3FF;

  --shell-h:        44px;
  --sidebar-w:      220px;
  --sidebar-w-collapsed: 48px;
  --radius:         8px;
  --radius-sm:      4px;
  --shadow:         0 1px 4px rgba(0,0,0,.12);
  --shadow-md:      0 2px 12px rgba(0,0,0,.14);
  --shadow-lg:      0 4px 24px rgba(0,0,0,.16);
}

/* ── 全局重置 ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sap-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }

/* ══════════════════════════════════════════════════════
   登录页
   ══════════════════════════════════════════════════════ */
.login-page {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* 左侧品牌区 */
.login-brand {
  flex: 0 0 28%;
  max-width: 380px;
  min-width: 260px;
  background: linear-gradient(160deg, #0654A4 0%, #0070F2 55%, #1A91F0 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  padding: 0;
  position: relative;
  overflow: hidden;
  color: #fff;
}

.login-brand::before {
  content: "";
  position: absolute;
  width: 500px; height: 500px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  top: -160px; right: -160px;
  pointer-events: none;
}
.login-brand::after {
  content: "";
  position: absolute;
  width: 360px; height: 360px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  bottom: -100px; left: -100px;
  pointer-events: none;
}

.login-brand-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 56px 52px;
  position: relative;
  z-index: 1;
}

.login-brand-logo {
  width: 64px; height: 64px;
  background: rgba(255,255,255,0.15);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.25);
}
.login-brand-logo svg { width: 36px; height: 36px; }

.login-brand-name {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}
.login-brand-system {
  font-size: 14px;
  opacity: 0.75;
  margin-bottom: 36px;
}

.login-brand-divider {
  width: 40px;
  height: 2px;
  background: rgba(255,255,255,0.3);
  margin-bottom: 28px;
  border-radius: 1px;
}

.login-brand-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-brand-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  opacity: 0.85;
}
.login-brand-features li svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
  opacity: 0.9;
}

.login-brand-footer {
  padding: 20px 52px;
  font-size: 12px;
  opacity: 0.45;
  border-top: 1px solid rgba(255,255,255,0.1);
  position: relative;
  z-index: 1;
}

/* 右侧登录表单区 */
.login-form-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 40px 32px;
  min-width: 0;
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 40px 36px 36px;
  border: 1px solid var(--border-light);
}

.login-box-header { margin-bottom: 28px; }
.login-box-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.login-box-sub {
  font-size: 13px;
  color: var(--text-mute);
}

.login-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--red-bg);
  border: 1px solid #F5B8B8;
  border-left: 3px solid var(--red);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
}
.login-alert .alert-icon { width: 16px; height: 16px; flex-shrink: 0; }

.login-form { display: flex; flex-direction: column; gap: 20px; }

.form-field {}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 7px;
}
.form-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.form-input-icon {
  position: absolute;
  left: 10px;
  width: 16px; height: 16px;
  color: var(--text-light);
  pointer-events: none;
  flex-shrink: 0;
}
.form-input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus {
  border-color: var(--sap-blue);
  box-shadow: 0 0 0 3px rgba(0,112,242,0.12);
}
.form-input:hover:not(:focus) { border-color: #9EA0A3; }

.btn-login {
  width: 100%;
  height: 40px;
  background: var(--sap-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, box-shadow 0.15s;
  margin-top: 4px;
}
.btn-login svg { width: 15px; height: 15px; }
.btn-login:hover  { background: var(--sap-blue-hover); box-shadow: 0 2px 8px rgba(0,112,242,0.35); }
.btn-login:active { background: var(--sap-blue-dark); }

.login-footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 20px;
}

/* 响应式 */
@media (max-width: 860px) {
  .login-brand { display: none; }
  .login-form-area { padding: 32px 20px; }
  .login-box { padding: 32px 24px; }
}
@media (max-width: 480px) {
  .login-form-area { padding: 20px 16px; align-items: flex-start; padding-top: 60px; }
  .login-box { padding: 28px 20px; box-shadow: none; border: none; background: transparent; }
}

/* ══════════════════════════════════════════════════════
   Shell Bar（顶部全局导航栏）
   ══════════════════════════════════════════════════════ */
.shell-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--shell-h);
  background: var(--sap-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.shell-left, .shell-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.shell-center { flex: 1; padding: 0 16px; }

.shell-btn {
  width: 36px; height: 36px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.85);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.shell-btn svg { width: 18px; height: 18px; }
.shell-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }

.shell-product {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: #fff;
  text-decoration: none;
  transition: background 0.15s;
}
.shell-product:hover { background: rgba(255,255,255,0.12); text-decoration: none; color: #fff; }
.shell-product-logo {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
}
.shell-product-logo svg { width: 28px; height: 28px; }
.shell-product-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.shell-product-sub {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
}

.shell-breadcrumb {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}

.shell-clock {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  padding: 0 8px;
  white-space: nowrap;
}

.shell-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #3AE374;
  box-shadow: 0 0 0 2px rgba(58,227,116,0.3);
  margin: 0 4px;
  flex-shrink: 0;
}

/* 用户菜单 */
.shell-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.shell-user:hover { background: rgba(255,255,255,0.12); }
.shell-avatar {
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.shell-username  { font-size: 13px; color: #fff; white-space: nowrap; }
.shell-chevron   { width: 12px; height: 12px; color: rgba(255,255,255,0.7); fill: none; stroke: currentColor; stroke-width:2; }

/* 用户下拉菜单 */
.shell-user-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  overflow: hidden;
  z-index: 1100;
}
.shell-user-menu.open { display: block; }

.user-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}
.user-menu-avatar {
  width: 40px; height: 40px;
  background: var(--sap-blue-light);
  color: var(--sap-blue);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.user-menu-name { font-size: 14px; font-weight: 600; }
.user-menu-role { font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.user-menu-divider { height: 1px; background: var(--border-light); }
.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text);
  transition: background 0.12s;
}
.user-menu-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.user-menu-item:hover { background: var(--surface2); text-decoration: none; color: var(--text); }
.user-menu-logout { color: var(--red); }
.user-menu-logout:hover { background: var(--red-bg); color: var(--red); }

/* ══════════════════════════════════════════════════════
   主布局（Shell Bar 以下）
   ══════════════════════════════════════════════════════ */
.erp-body { overflow-y: auto; }

.erp-layout {
  display: flex;
  margin-top: var(--shell-h);
  min-height: calc(100vh - var(--shell-h));
}

/* ── 侧边导航 ─────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: calc(100vh - var(--shell-h));
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--shell-h);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.2s ease, transform 0.2s ease;
  z-index: 900;
  flex-shrink: 0;
}
.erp-layout.sidebar-collapsed .sidebar {
  width: var(--sidebar-w-collapsed);
}
.erp-layout.sidebar-collapsed .nav-text,
.erp-layout.sidebar-collapsed .nav-badge,
.erp-layout.sidebar-collapsed .nav-group-title,
.erp-layout.sidebar-collapsed .sidebar-footer { display: none; }

.nav-list { padding: 8px 0; flex: 1; }

.nav-group-title {
  padding: 16px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.nav-item.active > .nav-link {
  background: var(--sap-blue-light);
  color: var(--sap-blue);
  border-right: 3px solid var(--sap-blue);
}
.nav-item.disabled > .nav-link {
  opacity: 0.5;
  pointer-events: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.12s, color 0.12s;
  border-right: 3px solid transparent;
  text-decoration: none;
}
.nav-link:hover { background: var(--surface2); color: var(--sap-blue); text-decoration: none; }

.nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: 0.75;
}
.nav-item.active .nav-icon { opacity: 1; }

.nav-badge {
  margin-left: auto;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.nav-badge.coming {
  background: var(--orange-bg);
  color: var(--orange);
}
.nav-badge.new {
  background: var(--green-bg);
  color: var(--green);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-version { font-size: 11px; color: var(--text-light); }
.sidebar-date    { font-size: 11px; color: var(--text-light); }

.sidebar-overlay {
  position: fixed;
  top: var(--shell-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 880;
}
.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── 主内容区 ─────────────────────────────────────────── */
.erp-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  transition: margin-left 0.2s ease;
  padding: 24px 28px 40px;
}
.erp-layout.sidebar-collapsed .erp-main { margin-left: var(--sidebar-w-collapsed); }

/* 页面标题区 */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header-left {}
.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.page-subtitle { font-size: 13px; color: var(--text-mute); }
.page-header-right { display: flex; align-items: center; gap: 8px; }

/* ══════════════════════════════════════════════════════
   KPI 卡片行
   ══════════════════════════════════════════════════════ */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 1200px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .kpi-row { grid-template-columns: 1fr; } }

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  border-left: 3px solid var(--sap-blue);
  transition: box-shadow 0.15s;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-card.kpi-green  { border-left-color: var(--green); }
.kpi-card.kpi-orange { border-left-color: var(--orange); }
.kpi-card.kpi-teal   { border-left-color: #188469; }
.kpi-card.kpi-blue   { border-left-color: var(--sap-blue); }

/* 卡片左侧：图标 */
.kpi-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--text-mute);
  opacity: .6;
}
/* 卡片左侧：标题和数字 */
.kpi-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.kpi-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-value {
  font-size: 20px !important;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.kpi-value.blue   { color: var(--sap-blue); }
.kpi-value.green  { color: var(--green); }
.kpi-value.orange { color: var(--orange); }
.kpi-status-ok    { color: #107E3E; }

.kpi-meta {
  font-size: 11px;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-meta a { color: var(--sap-blue); }

.kpi-note {
  font-size: 11px;
  color: var(--text-mute);
}
.kpi-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
}
.kpi-badge.up   { background: var(--green-bg); color: var(--green); }
.kpi-badge.ok   { background: var(--blue-bg);  color: var(--sap-blue); }

/* ══════════════════════════════════════════════════════
   通用卡片容器
   ══════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.card-subtitle { font-size: 13px; color: var(--text-mute); margin-top: 2px; }
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--surface2);
  font-size: 12px;
  color: var(--text-mute);
}

/* ══════════════════════════════════════════════════════
   区块标题行
   ══════════════════════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.section-sub {
  font-size: 12px;
  color: var(--text-mute);
  margin-left: 10px;
}
.section-more {
  font-size: 12px;
  color: var(--sap-blue);
  text-decoration: none;
}
.section-more:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════
   快捷入口列表（service-row）
   ══════════════════════════════════════════════════════ */
.service-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.service-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm, 6px);
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.service-link:hover {
  background: var(--surface2);
  border-color: var(--sap-blue);
  box-shadow: 0 2px 8px rgba(0,112,242,.08);
  text-decoration: none;
  color: var(--text);
}
.service-link-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.service-link-name {
  font-weight: 600;
  font-size: 13px;
  min-width: 120px;
}
.service-link-desc {
  font-size: 12px;
  color: var(--text-mute);
  flex: 1;
}
.service-link-arrow {
  width: 14px;
  height: 14px;
  color: var(--text-mute);
  flex-shrink: 0;
  transition: transform 0.15s;
}
.service-link:hover .service-link-arrow {
  transform: translateX(3px);
  color: var(--sap-blue);
}

/* ══════════════════════════════════════════════════════
   最近访问快速预览表
   ══════════════════════════════════════════════════════ */
.quick-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.quick-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.quick-table th {
  text-align: left;
  padding: 10px 16px;
  background: var(--surface2);
  color: var(--text-mute);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}
.quick-table td {
  padding: 9px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text);
}
.quick-table tr:last-child td { border-bottom: none; }
.quick-table tr:hover td { background: var(--surface2); }
.td-ip   { font-family: monospace; font-size: 13px; }
.td-time { font-size: 12px; color: var(--text-mute); white-space: nowrap; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.tag-source { background: var(--blue-bg, #EEF4FF); color: var(--sap-blue); }

/* ══════════════════════════════════════════════════════
   服务快捷入口 Launchpad 磁贴
   ══════════════════════════════════════════════════════ */
.launchpad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* ── 磁贴网格（dashboard 使用） ── */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 2rem;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  padding: 0;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  user-select: none;
}
/* 顶部色条 */
.tile::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--tile-accent, var(--sap-blue));
  transition: height 0.2s ease;
}
/* 悬浮效果：明显上浮 + 加深阴影 + 色条变宽 */
.tile:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.16);
  transform: translateY(-5px);
  border-color: var(--tile-accent, var(--sap-blue));
  text-decoration: none;
  color: var(--text);
}
.tile:hover::before {
  height: 6px;
}
.tile:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

/* 磁贴内部布局 */
.tile-top {
  padding: 20px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tile-icon {
  width: 48px; height: 48px;
  color: var(--tile-accent, var(--sap-blue));
  opacity: .85;
  transition: opacity 0.2s, transform 0.2s;
}
.tile:hover .tile-icon {
  opacity: 1;
  transform: scale(1.08);
}
.tile-body {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.tile-count {
  font-size: 28px;
  font-weight: 700;
  color: var(--tile-accent, var(--sap-blue));
  line-height: 1.1;
}
.tile-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.tile-desc {
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.4;
}
.tile-soon { color: var(--text-mute); font-size: 22px; }

/* 磁贴角标 */
.tile-badge {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: #E8F4E8;
  color: #107E3E;
  letter-spacing: .04em;
}

/* 磁贴颜色主题 */
.tile-blue  { --tile-accent: #0070F2; }
.tile-green { --tile-accent: #107E3E; }
.tile-orange{ --tile-accent: #E9730C; }
.tile-purple{ --tile-accent: #6A1B9A; }
.tile-teal  { --tile-accent: #0E8A8A; }
.tile-gray  { --tile-accent: #89919A; }

/* 禁用磁贴 */
.tile-disabled {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

/* 旧版兼容 */
.tile-icon-wrap {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tile-color, var(--sap-blue)) 12%, white);
  display: flex; align-items: center; justify-content: center;
}
.tile-icon-wrap svg { width: 24px; height: 24px; color: var(--tile-color, var(--sap-blue)); }
.tile-arrow {
  margin-top: auto;
  font-size: 13px;
  color: var(--text-mute);
  display: flex;
  align-items: center;
  gap: 4px;
}
.tile-arrow svg { width: 14px; height: 14px; }

/* ══════════════════════════════════════════════════════
   数据表格
   ══════════════════════════════════════════════════════ */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 10px;
}
.table-search {
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-search input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  outline: none;
  width: 220px;
  transition: border-color 0.15s;
}
.table-search input:focus { border-color: var(--sap-blue); }
.table-total {
  font-size: 13px;
  color: var(--text-mute);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--border);
  background: var(--surface2);
  white-space: nowrap;
}
.data-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}
.data-table tbody tr:hover { background: var(--surface2); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody td {
  padding: 12px 16px;
  color: var(--text);
  vertical-align: middle;
}

/* 状态标签 */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-tag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-tag.green  { background: var(--green-bg);  color: var(--green); }
.status-tag.orange { background: var(--orange-bg); color: var(--orange); }
.status-tag.red    { background: var(--red-bg);    color: var(--red); }
.status-tag.blue   { background: var(--blue-bg);   color: var(--sap-blue); }
.status-tag.grey   { background: var(--surface2);  color: var(--text-mute); }

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
}
.pagination .page-info { font-size: 13px; color: var(--text-mute); margin-right: 8px; }
.page-btn {
  height: 30px;
  min-width: 30px;
  padding: 0 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.12s;
}
.page-btn:hover:not(:disabled) { border-color: var(--sap-blue); color: var(--sap-blue); background: var(--blue-bg); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn.active { background: var(--sap-blue); border-color: var(--sap-blue); color: #fff; }

/* ══════════════════════════════════════════════════════
   按钮组件
   ══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--sap-blue);
  color: #fff;
  border-color: var(--sap-blue);
}
.btn-primary:hover {
  background: var(--sap-blue-hover);
  border-color: var(--sap-blue-hover);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,112,242,0.3);
}

.btn-secondary {
  background: var(--surface);
  color: var(--sap-blue);
  border-color: var(--sap-blue);
}
.btn-secondary:hover {
  background: var(--sap-blue-light);
  color: var(--sap-blue-dark);
  border-color: var(--sap-blue-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--text-mute);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--surface2);
  color: var(--text);
}

.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 24px; font-size: 15px; }

/* ══════════════════════════════════════════════════════
   仪表盘 — 官网访客图表区
   ══════════════════════════════════════════════════════ */
.dashboard-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 900px) { .dashboard-row { grid-template-columns: 1fr; } }

.section-gap { margin-bottom: 24px; }

/* 当前访问者 IP 显示 */
.current-ip-card {
  background: linear-gradient(135deg, var(--sap-blue) 0%, var(--sap-blue-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  box-shadow: 0 4px 16px rgba(0,112,242,0.3);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.current-ip-label { font-size: 13px; opacity: 0.8; }
.current-ip-value { font-size: 32px; font-weight: 700; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.current-ip-meta  { font-size: 12px; opacity: 0.7; }

/* ══════════════════════════════════════════════════════
   占位提示（功能开发中）
   ══════════════════════════════════════════════════════ */
.coming-soon-box {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-mute);
}
.coming-soon-box svg {
  width: 64px; height: 64px;
  opacity: 0.35;
  margin-bottom: 16px;
}
.coming-soon-box h3 { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.coming-soon-box p  { font-size: 14px; }

/* ══════════════════════════════════════════════════════
   滚动条美化
   ══════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9EA0A3; }

/* ══════════════════════════════════════════════════════
   响应式：手机隐藏侧边栏
   ══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 950;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .shell-center { display: none; }
  .erp-main { margin-left: 0 !important; padding: 12px; }
  .page-header-right { width: 100%; justify-content: flex-start; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-card { padding: 10px 12px; }
  .shell-clock, .shell-username { display: none; }
  .dashboard-row { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .fd-table__table { min-width: 640px; }
}
@media (max-width: 400px) {
  .erp-main { padding: 10px; }
  .kpi-row { gap: 8px; }
  .kpi-card { padding: 8px 10px; }
}

/* ══════════════════════════════════════════════════════
   SAP Fundamental Styles 覆盖 — 对齐杉越 ERP 设计规范
   ══════════════════════════════════════════════════════ */

/* 统一字体 */
.fd-button, .fd-input, .fd-badge, .fd-object-status,
.fd-table__cell, .fd-table__cell--header {
  font-family: "Microsoft YaHei", sans-serif;
}

/* ── fd-button ──────────────────────────────────────── */
.fd-button--emphasized {
  background: var(--sap-blue);
  border-color: var(--sap-blue);
  color: #fff;
}
.fd-button--emphasized:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--sap-blue-hover);
  border-color: var(--sap-blue-hover);
  color: #fff;
}
.fd-button__icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ── fd-table ──────────────────────────────────────── */
.fd-table {
  border-radius: var(--radius);
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.fd-table__cell--header {
  background: var(--surface2) !important;
  color: var(--text-mute) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 16px !important;
  border-bottom: 2px solid var(--border) !important;
  white-space: nowrap;
}
.fd-table__cell {
  padding: 12px 16px !important;
  color: var(--text);
  font-size: 13px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
}
.fd-table__row:last-child .fd-table__cell { border-bottom: none; }
.fd-table__row--hoverable:hover .fd-table__cell {
  background: var(--sap-blue-light) !important;
}
.fd-table__table { width: 100%; border-collapse: collapse; }

/* ── fd-object-status ──────────────────────────────── */
.fd-object-status--positive {
  color: var(--green) !important;
  background: var(--green-bg) !important;
  border-color: transparent !important;
  font-weight: 600;
}
.fd-object-status--negative {
  color: var(--red) !important;
  background: var(--red-bg) !important;
  border-color: transparent !important;
  font-weight: 600;
}

/* ── fd-badge ──────────────────────────────────────── */
.fd-badge {
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.fd-badge--information {
  background: var(--blue-bg) !important;
  color: var(--sap-blue) !important;
  border-color: transparent !important;
}

/* ── fd-input ──────────────────────────────────────── */
.fd-input {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 240px;
}
.fd-input:focus {
  border-color: var(--sap-blue);
  box-shadow: 0 0 0 3px rgba(0,112,242,0.12);
}

/* ── 搜索框图标定位 ────────────────────────────────── */
.search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--text-mute);
  pointer-events: none;
  z-index: 1;
}
