/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f5f6f7;
  color: #1f2329;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: #3370ff; text-decoration: none; }
a:hover { color: #245bdb; }
code { background: #f0f4ff; padding: 2px 6px; border-radius: 4px; font-size: 13px; color: #3370ff; }

/* Navbar */
.navbar {
  background: #fff;
  border-bottom: 1px solid #e5e6eb;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.nav-brand { font-size: 16px; font-weight: 600; color: #1f2329; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-user { font-size: 13px; color: #646a73; }
.nav-link {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #646a73;
  transition: all 0.15s;
}
.nav-link:hover { background: #f5f6f7; color: #1f2329; }

/* Layout */
.layout {
  display: flex;
  margin-top: 56px;
  min-height: calc(100vh - 56px);
}

/* Sidebar */
.sidebar {
  width: 220px;
  background: #fff;
  border-right: 1px solid #e5e6eb;
  padding: 20px 12px;
  position: fixed;
  top: 56px;
  bottom: 0;
  overflow-y: auto;
}
.sidebar-section { margin-bottom: 24px; }
.sidebar-title {
  font-size: 11px;
  font-weight: 600;
  color: #8f959e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 12px;
  margin-bottom: 8px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2329;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.sidebar-item:hover { background: #f5f6f7; }
.sidebar-item.active { background: #f0f4ff; color: #3370ff; font-weight: 500; }
.sidebar-icon { font-size: 16px; }

/* Main content */
.main-content {
  flex: 1;
  margin-left: 220px;
  padding: 32px 40px;
}

/* Page */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 600; }

/* Card */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid #e5e6eb;
  margin-bottom: 20px;
}

/* Highlight card (企业标识) */
.highlight-card {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
  border: 2px solid #3370ff;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 20px;
}
.highlight-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.highlight-label { font-size: 14px; color: #646a73; }
.highlight-value {
  font-size: 28px;
  font-weight: 700;
  color: #3370ff;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  letter-spacing: 1px;
}
.btn-copy {
  padding: 4px 10px;
  border: 1px solid #3370ff;
  background: #fff;
  color: #3370ff;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-copy:hover { background: #3370ff; color: #fff; }
.highlight-desc { font-size: 14px; color: #646a73; margin-bottom: 16px; }
.highlight-img {
  width: 100%;
  max-width: 500px;
  border-radius: 8px;
  border: 1px solid #e5e6eb;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* User header */
.user-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f1f2;
}
.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #3370ff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
}
.user-meta .name { font-size: 16px; font-weight: 500; color: #1f2329; }
.user-meta div:last-child { font-size: 13px; color: #8f959e; margin-top: 2px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary { background: #3370ff; color: #fff; }
.btn-primary:hover { background: #245bdb; }
.btn-danger { background: #fff; color: #f54a45; border: 1px solid #f54a45; }
.btn-danger:hover { background: #fef0ef; }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}
.status-PENDING_APPROVAL { background: #fff7e6; color: #d46b08; }
.status-APPROVED { background: #e6f7ff; color: #096dd9; }
.status-ACTIVE { background: #f0fff4; color: #389e0d; }
.status-REJECTED { background: #fff1f0; color: #cf1322; }
.status-REVOKED { background: #f5f5f5; color: #595959; }
.status-FAILED { background: #fff1f0; color: #cf1322; }

/* Result */
.result { margin-top: 16px; padding: 12px 16px; border-radius: 8px; font-size: 14px; }
.result.success { background: #f0fff4; color: #389e0d; border: 1px solid #b7eb8f; }
.result.error { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }

/* Approver preview */
.approver-preview {
  padding: 14px 18px;
  border-radius: 8px;
  background: #f0f4ff;
  margin-bottom: 16px;
  border: 1px solid #d6e4ff;
}
.approver-preview p { font-size: 14px; margin-bottom: 4px; }
.approver-preview .sub { color: #8f959e; font-size: 12px; }

/* Docs */
.doc-section { margin-bottom: 28px; }
.doc-section:last-child { margin-bottom: 0; }
.doc-section h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #1f2329;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f1f2;
}
.doc-section p { margin-bottom: 8px; font-size: 14px; }
.doc-section ul { padding-left: 20px; margin-bottom: 12px; }
.doc-section ul li { margin-bottom: 6px; font-size: 14px; }
.doc-warning {
  padding: 12px 16px;
  background: #fffbe6;
  border-radius: 8px;
  color: #ad6800;
  font-size: 13px;
  margin-top: 12px;
  border: 1px solid #ffe58f;
}
.doc-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.doc-table th, .doc-table td { padding: 10px 16px; border: 1px solid #e5e6eb; text-align: left; }
.doc-table th { background: #fafbfc; font-weight: 600; color: #646a73; font-size: 13px; }
.doc-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.doc-link-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 20px;
  background: #fafbfc;
  border-radius: 10px;
  color: #1f2329;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  border: 1px solid #e5e6eb;
}
.doc-link-card:hover {
  background: #f0f4ff;
  border-color: #3370ff;
  color: #3370ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(51,112,255,0.1);
}
.link-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #f0f4ff;
  border-radius: 8px;
  color: #3370ff;
  font-weight: 500;
  transition: all 0.15s;
}
.link-btn:hover { background: #3370ff; color: #fff; }

/* Utility */
.hidden { display: none !important; }
.text-secondary { color: #646a73; font-size: 14px; }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 14px 20px; text-align: left; border-bottom: 1px solid #f0f1f2; }
.data-table th { font-weight: 600; color: #646a73; font-size: 13px; background: #fafbfc; }
.data-table tr:hover td { background: #f5f6f7; }
.data-table td { color: #1f2329; }
