/* 宝葫芦公共页头卡 —— 与 juhe 工作台首卡保持同一视觉语言
   用法：<header class="bh-header" style="--bh-w:1200px">…</header>
   宽度由 --bh-w 控制，默认 1100px；嵌入已有容器时可设为 100%。 */

.bh-header {
  --bh-w: 1100px;
  width: 100%;
  max-width: var(--bh-w);
  margin: 0 auto 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .06);
  position: relative;
  overflow: hidden;
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  color: #1a202c;
  line-height: 1.4;
  text-align: left;
}

.bh-header * { box-sizing: border-box; }

.bh-header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 24px;
  position: relative;
  z-index: 2;
}

.bh-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  border: 1px solid #dfe5ec;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bh-logo svg {
  width: 28px;
  height: 28px;
  color: #000;
  display: block;
}

.bh-titles {
  flex: 1 1 240px;
  min-width: 200px;
}

.bh-titles h1 {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-shadow: none;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 1px;
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bh-sub {
  margin: 3px 0 0;
  font-size: 11px;
  color: #64748b;
  letter-spacing: 3px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bh-clock {
  flex: 0 0 auto;
  text-align: right;
  padding-left: 16px;
  border-left: 1px solid #e2e8f0;
}

.bh-clock-time {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  line-height: 1.2;
}

.bh-clock-date {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  letter-spacing: 1px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.bh-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.bh-meta {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.bh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #3b82f6;
  border-radius: 8px;
  background: #fff;
  color: #3b82f6;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.bh-btn:hover {
  background: #3b82f6;
  color: #fff;
}

.bh-btn-icon {
  width: 38px;
  padding: 0;
}

.bh-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.bh-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: #1e293b;
  z-index: 1;
}

@media (max-width: 640px) {
  .bh-header { margin-bottom: 16px; }

  .bh-header-inner {
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 14px 16px;
  }

  .bh-logo {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 9px;
  }

  .bh-logo svg { width: 28px; height: 28px; }

  .bh-titles { flex: 1 1 auto; }

  .bh-titles h1 {
    font-size: 18px;
    letter-spacing: .5px;
  }

  .bh-sub { display: none; }

  .bh-clock { display: none; }

  .bh-actions {
    width: 100%;
    padding-left: 0;
    border-left: 0;
    justify-content: flex-end;
    flex-wrap: wrap;
    row-gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bh-btn { transition: none; }
}
