/* ---------- one top bar for every page (2026-11-19) ----------
   The admin panel's bar (css/admin.css), drawn by src/components/Topbar.jsx inside <header class="topbar df-bar">:
   60px + 1px line, full width, "Design Finder / <sub>", the buttons on the right 8px apart.
   Linked after the page's own stylesheet. Every rule starts with "html body > header.topbar.df-bar", so it wins over the
   pages' older ".topbar / .brand / .ghost" rules (left in place, unused for the bar) and sets every property those set.
   Page-only extras inside the bar (home's .top-btn buttons, brand import's .nav, the job card's Print) keep their page's styles.
   ui/staff-top.js (staff accounts) dresses this same bar the same way. */
html body > header.topbar.df-bar { position: sticky; top: 0; z-index: 30; box-sizing: border-box; display: block; height: auto; margin: 0; padding: 0;
  background: var(--th-paper, #fff); border-bottom: 1px solid var(--th-line, #e7e5e4); backdrop-filter: none; -webkit-backdrop-filter: none;
  color: var(--th-ink, #292524); font: 14px/1.5 Geist, system-ui, -apple-system, "Segoe UI", "Noto Sans Gujarati", sans-serif; letter-spacing: normal; }
html body > header.topbar.df-bar > .in { box-sizing: border-box; max-width: none; height: 60px; margin: 0; padding: 0 24px;
  display: flex; align-items: center; justify-content: flex-start; gap: 28px; }

html body > header.topbar.df-bar .brand { display: flex; align-items: center; gap: 10px; flex: none; min-width: 0; margin: 0; padding: 0;
  text-decoration: none; color: var(--th-ink, #292524); background: none; }
html body > header.topbar.df-bar .brand svg { width: 30px; height: 30px; flex: none; }
html body > header.topbar.df-bar .brand > div { display: block; min-width: 0; }
html body > header.topbar.df-bar .brand b { display: block; margin: 0; font: 600 15px/1.5 Geist, system-ui, sans-serif; letter-spacing: -.01em;
  text-transform: none; white-space: nowrap; color: var(--th-ink, #292524); }
html body > header.topbar.df-bar .brand small { display: block; margin: 1px 0 0; font: 500 12px/1.5 Geist, system-ui, sans-serif; letter-spacing: 0;
  text-transform: none; color: var(--th-muted, #6b6560); }
/* home and AI tools: staff with the admin icon rail read "Admin panel" under the name, and the rail's ring is the logo */
html body > header.topbar.df-bar .brand .sub-staff { display: none; }
@media (min-width: 721px) {
  html.df-railed body > header.topbar.df-bar .brand svg { display: none; }
  html.df-railed body > header.topbar.df-bar .brand .sub-cust { display: none; }
  html.df-railed body > header.topbar.df-bar .brand .sub-staff { display: block; }
}

/* the right-hand group: the page's extras, the back link, then (added by the shared scripts) phone, favourites, theme, bell, profile */
html body > header.topbar.df-bar .top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }

/* the back link: a round-ended pill the height and colours of the round buttons beside it (theme, bell) */
html body > header.topbar.df-bar #back.df-back { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none;
  height: 40px; min-height: 0; margin: 0; padding: 0 16px 0 12px; border: 1px solid var(--th-gold-line, #cddba7); border-radius: 999px;
  background: var(--th-paper, #fff); color: var(--th-ink-2, #44403c); box-shadow: none; transform: none;
  font: 500 13.5px/1 Geist, system-ui, sans-serif; letter-spacing: 0; text-transform: none; text-decoration: none; white-space: nowrap;
  transition: border-color 150ms ease, background-color 150ms ease; }
html body > header.topbar.df-bar #back.df-back:hover { border-color: var(--gold, #4e7a2e); background: var(--th-paper-2, #fafaf9); color: var(--th-ink, #292524); transform: none; }
html body > header.topbar.df-bar #back.df-back:active { transform: scale(.97); }
html body > header.topbar.df-bar #back.df-back svg { width: 16px; height: 16px; flex: none; color: var(--th-gold-text, #47702a); }

/* phones: the ring alone at the left, the back link as its arrow */
@media (max-width: 720px) {
  html body > header.topbar.df-bar > .in { padding: 0 12px; gap: 8px; }
  html body > header.topbar.df-bar .top-right { gap: 6px; }
  html body > header.topbar.df-bar .brand > div { display: none; }
  html body > header.topbar.df-bar #back.df-back { width: 40px; padding: 0; }
  html body > header.topbar.df-bar #back.df-back > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 380px) {   /* small phones: as the round buttons (ui/theme.css), so the bar fits without sideways scrolling */
  html body > header.topbar.df-bar .top-right { gap: 4px; }
  html body > header.topbar.df-bar #back.df-back { width: 34px; height: 34px; }
}

/* ---------- the CaratIQ logo (2026-11-23, the client's final logo) ----------
   components/icons.jsx CaratIQ: the wordmark (light theme: dark text, dark theme: white text) instead of the ring + "Design Finder";
   the page's small line ("Fine jewellery atelier", "Admin panel", …) follows after a thin line. Phones: the Q mark alone, as the ring was. */
html body > header.topbar.df-bar .brand .ciq { display: flex; align-items: center; flex: none; }
html body > header.topbar.df-bar .brand .ciq img { display: none; width: auto; height: 28px; }
html body > header.topbar.df-bar .brand .ciq .ciq-full.ciq-l { display: block; }
html[data-theme="dark"] body > header.topbar.df-bar .brand .ciq .ciq-full.ciq-l { display: none; }
html[data-theme="dark"] body > header.topbar.df-bar .brand .ciq .ciq-full.ciq-d { display: block; }
html body > header.topbar.df-bar .brand > .ciq + div { padding-left: 10px; border-left: 1px solid var(--th-line, #e7e5e4); }
html body > header.topbar.df-bar .brand > .ciq + div small { margin: 0; }
@media (max-width: 720px) {
  html body > header.topbar.df-bar .brand .ciq .ciq-full.ciq-l, html[data-theme="dark"] body > header.topbar.df-bar .brand .ciq .ciq-full.ciq-d { display: none; }
  html body > header.topbar.df-bar .brand .ciq .ciq-mark.ciq-l { display: block; height: 30px; }
  html[data-theme="dark"] body > header.topbar.df-bar .brand .ciq .ciq-mark.ciq-l { display: none; }
  html[data-theme="dark"] body > header.topbar.df-bar .brand .ciq .ciq-mark.ciq-d { display: block; height: 30px; }
}
