/* ============================================================
   header_bar.css — CANONICAL top bar for all admin pages
   Single source of truth. Include in every admin_*.html page.
   DO NOT redefine .mac-topbar or .mac-topbar-* in other CSS files.
   ============================================================ */

/* ── Main topbar shell ──────────────────────────────────────── */
.mac-topbar {
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

/* ── Left section (back link + title) ──────────────────────── */
.mac-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mac-topbar-title,
.mac-topbar-label {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}

/* ── Right section (action buttons) ────────────────────────── */
.mac-topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Topbar buttons — base ──────────────────────────────────── */
.mac-topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1;
  height: 30px;
}
.mac-topbar-btn svg { width: 13px; height: 13px; flex-shrink: 0; }

/* Primary (blue filled) */
.mac-topbar-btn-primary {
  background: #3b82f6;
  color: #fff;
}
.mac-topbar-btn-primary:hover { background: #2563eb; }

/* Secondary (outlined) */
.mac-topbar-btn-secondary {
  background: transparent;
  color: #6b7280;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.mac-topbar-btn-secondary:hover { background: #f9fafb; color: #374151; }

/* Danger ghost */
.mac-topbar-btn-ghost {
  background: transparent;
  color: #dc2626;
}
.mac-topbar-btn-ghost:hover { background: #fef2f2; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .mac-topbar { padding: 0 16px; }
  .mac-topbar-title,
  .mac-topbar-label { max-width: 200px; }
}
