@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Noto+Serif+SC:wght@400;600;700;900&display=swap');

/* 页眉品牌字级：加工厂 slogan 略小于毛坯端主标语；logo 略大以保持品牌识别 */
:root {
  --magmend-brand-text-size: 16px;
  --magmend-brand-logo-size: 30px;
  --magmend-factory-tagline-size: 14px;
}

/* 磁集在线 · 页眉 Logo（方案 C：中文 + 红色下划线 + MAGMEND） */
.magmend-logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
  cursor: default;
  user-select: none;
  gap: 0;
  position: relative;
}

.magmend-logo .logo-cn {
  font-family: 'Noto Serif SC', 'Songti SC', STSong, serif;
  font-weight: 800;
  font-size: var(--magmend-brand-logo-size);
  letter-spacing: 0.12em;
  color: #ffffff;
  line-height: 1.15;
  padding-bottom: 5px;
  border-bottom: 2px solid #e63329;
}

.magmend-logo .logo-en {
  font-family: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  font-size: 9px;
  letter-spacing: 0.5em;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 4px;
  line-height: 1;
}

/* 浅色导航栏（首页） */
.magmend-logo--nav .logo-cn {
  color: #1e3a6e;
  font-size: 18px;
}

.magmend-logo--nav .logo-en {
  color: rgba(30, 58, 110, 0.45);
  font-size: 8px;
  letter-spacing: 0.45em;
}

/* app 页眉条 */
.magmend-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.magmend-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

/* 加工厂页眉用户区：紧凑版，布局与毛坯厂 userbox 一致 */
.app-userbox {
  display: none;
  background: #fff;
  border: 1px solid #d9e3e9;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 11px;
  color: #374151;
  min-width: 0;
  max-width: 200px;
  text-align: right;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(56, 76, 92, 0.06);
  line-height: 1.3;
}

.app-userbox b {
  font-weight: 700;
  color: #1f2937;
  font-size: 11px;
}

.app-userbox .company {
  display: block;
  margin-top: 2px;
  line-height: 1.35;
  text-align: right;
  color: #6b7280;
  font-size: 11px;
  word-break: break-all;
}

.app-userbox .userbox-actions {
  display: flex;
  gap: 5px;
  margin-top: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.app-userbox .btn {
  margin: 0;
  border: 0;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
  transition: 0.18s ease;
  filter: none !important;
}

.app-userbox .btn-blue {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
}

.app-userbox .btn-gray {
  background: #eef2f7;
  color: #374151;
}

.app-userbox .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
  filter: none !important;
}

.magmend-header-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 6px;
}

.magmend-header-tagline {
  font-size: var(--magmend-factory-tagline-size, 14px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.magmend-header-portal-badge {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ecfdf5;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
}

@media (max-width: 600px) {
  :root {
    --magmend-brand-text-size: 15px;
    --magmend-factory-tagline-size: 13px;
    --magmend-brand-logo-size: 24px;
  }
  .magmend-logo .logo-en { font-size: 8px; letter-spacing: 0.4em; }
  .magmend-header-divider { height: 22px; }
  .magmend-header-inner { flex-direction: column; align-items: flex-start; }
  .app-userbox { width: 100%; min-width: 0; text-align: left; }
  .app-userbox .company { text-align: left; }
  .app-userbox .userbox-actions { justify-content: flex-start; }
}
