
/* AI generation: the jeweler panel's design system. A rail of tools grouped by job, the open tool beside it. */
:root {
  --ground: #f5f5f4; --surface: #ffffff; --sunken: #fafaf9; --line: #e7e5e4; --line-strong: #d6d3d1;
  --ink: #292524; --ink-2: #44403c; --muted: #6b6560;
  --gold: #4e7a2e; --gold-text: #47702a; --gold-tint: #eff6e9; --gold-line: #cddba7;
  --font: Geist, system-ui, -apple-system, "Segoe UI", "Noto Sans Gujarati", sans-serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--ground); color: var(--ink);
  font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ico { width: 18px; height: 18px; flex: none; }

.topbar { flex: none; height: 61px; display: flex; align-items: center; gap: 16px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.brand small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 1px; }
/* Staff: BOM quote is a section of the admin panel, not an app nested inside it. The admin sidebar is the icon rail on the
   left (ui/admin-rail.js sets html.df-railed before the first paint) and its gold ring is the logo, so this top bar reads
   like the admin one: "Design Finder / Admin panel", no second logo. */
.brand .sub-staff { display: none; }
@media (min-width: 721px) { html.df-railed .brand svg { display: none; } }
@media (min-width: 821px) { html.df-railed .brand .sub-cust { display: none; } html.df-railed .brand .sub-staff { display: block; } }
.topbar [data-profile], .topbar .th-toggle { margin-left: auto; }
.topbar .th-toggle ~ [data-profile], .topbar .th-toggle + .nt { margin-left: 8px; }

/* the tools side panel is back (2026-10-27): sketch, variation, generator, video and social are on for staff again
.app { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }   (2026-10-19: BOM quote only, no panel) */
.app { flex: 1; min-height: 0; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.rail { background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; padding: 16px 12px 24px; }
.aitablist { display: grid; gap: 2px; }
.group { font-size: 12px; font-weight: 600; color: var(--muted); padding: 14px 10px 6px; }
.group:first-child { padding-top: 2px; }
.aitab { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: none;
  padding: 8px 10px; border-radius: 10px; color: var(--ink); transition: background-color 150ms ease; }
.aitab .ico { width: 32px; height: 32px; padding: 7px; border-radius: 8px; background: var(--sunken); border: 1px solid var(--line); color: var(--muted);
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease; }
.aitab b { display: block; font-size: 13.5px; font-weight: 600; }
.aitab small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; margin-top: 1px; }
.aitab:hover { background: var(--sunken); }
.aitab[aria-selected="true"] { background: var(--btn-fill, linear-gradient(135deg, #c7dd4a, #96cc76)); color: var(--btn-ink, #1d2f10); }
.aitab[aria-selected="true"] b { color: var(--gold-text); }
.aitab[aria-selected="true"] .ico { background: var(--btn-fill, linear-gradient(135deg, #c7dd4a, #96cc76)); border-color: var(--gold); color: var(--btn-ink, #1d2f10); }
.aitab:active { transform: scale(.99); }

.frames { position: relative; min-height: 0; }
.frames iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--ground); }

@media (max-width: 820px) {
  .topbar { padding: 0 12px; }
  .brand small { display: none; }
  .app { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }   /* the tools panel is a row of tabs on top */
  .rail { border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; padding: 8px 12px; scrollbar-width: none; }
  .aitablist { display: flex; gap: 6px; }
  .group { display: none; }
  .aitab { display: inline-flex; width: auto; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); white-space: nowrap; flex: none; }
  .aitab .ico { width: 28px; height: 28px; padding: 6px; }
  .aitab small { display: none; }
  .aitab[aria-selected="true"] { border-color: var(--gold-line); }
}
/* phones: logo, name, theme, bell and profile must fit one row; the name shortens with "…" instead of running under the buttons */
@media (max-width: 420px) {
  .topbar { gap: 8px; }
  .brand { gap: 8px; flex: 1 1 auto; }
  .brand > div { min-width: 0; overflow: hidden; }
  .brand b { display: block; overflow: hidden; text-overflow: ellipsis; }
  .topbar .th-toggle ~ [data-profile], .topbar .th-toggle + .nt { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
/* phones: form fields at 16px so iPhones don't zoom the page when one is tapped */
@media (max-width: 720px) {
  input, select, textarea { font-size: 16px; }
}
/* phones: the AI tools are a ☰ dropdown (the open tool's name on the button) instead of a sideways-scrolling row (2026-11-18).
   The button and list look like the admin panel's phone filter (admin.css .fpick / .fdrop). Phones only; tablets keep the
   row of tabs and laptops the side panel. */
.aimenu-btn { display: none; }
@media (max-width: 720px) {
  .rail { position: relative; overflow: visible; padding: 8px 12px; z-index: 20; }
  .aimenu-btn { display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 12px 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
  .aimenu-btn .k { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
  .aimenu-btn .v { flex: 1; min-width: 0; font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .aimenu-btn svg { flex: none; width: 18px; height: 18px; color: var(--muted); }
  .rail.menu-open .aimenu-btn { border-color: var(--gold-line); }
  .aitablist { display: none; }
  .rail.menu-open .aitablist { display: grid; gap: 1px; align-content: start; position: absolute; left: 12px; top: calc(100% - 4px); width: max-content; min-width: 190px; max-width: calc(100% - 24px);
    max-height: min(280px, 50vh); overflow-y: auto; overscroll-behavior: contain; padding: 4px; background: var(--surface-solid, var(--surface)); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.28); }
  .rail.menu-open .group { display: none; }
  .rail.menu-open .aitab { display: flex; align-items: center; width: 100%; min-height: 34px; padding: 0 10px; gap: 0; border: 0; border-radius: 8px; white-space: nowrap; background: none; }
  .rail.menu-open .aitab[hidden] { display: none; }
  .rail.menu-open .aitab .ico, .rail.menu-open .aitab small { display: none; }
  .rail.menu-open .aitab b { font-size: 13px; font-weight: 600; color: var(--ink); }
  .rail.menu-open .aitab:hover { background: var(--sunken); }
  .rail.menu-open .aitab[aria-selected="true"] { background: var(--btn-fill, linear-gradient(135deg, #c7dd4a, #96cc76)); box-shadow: inset 0 0 0 1px var(--gold-line); color: var(--btn-ink, #1d2f10); }
  .rail.menu-open .aitab[aria-selected="true"] b { color: var(--gold-text); }
}
/* phones: the tools button is the ☰ icon alone (no "Tool" / tool name on it), 2026-11-18. The words stay for screen
   readers; the open tool is highlighted in the list. Phones only. */
@media (max-width: 720px) {
  .aimenu-btn { width: 40px; height: 40px; padding: 0; justify-content: center; gap: 0; border-radius: 10px; }
  .aimenu-btn .k, .aimenu-btn .v { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; flex: none; }
  .aimenu-btn svg { width: 20px; height: 20px; color: var(--ink); }
  .rail { padding: 6px 12px; }
}
/* phones: the tools button floats at the top right just under the header (its own row is gone, the open tool gets the
   whole height); the tools list opens under it at the right edge (2026-11-18). Phones only. */
@media (max-width: 720px) {
  .app { position: relative; grid-template-rows: minmax(0, 1fr); }
  .rail { position: absolute; top: 8px; right: 12px; z-index: 20; padding: 0; border: 0; background: none; overflow: visible; }
  .aimenu-btn { background: var(--surface-solid, var(--surface)); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .35); }
  .rail.menu-open .aitablist { left: auto; right: 0; top: calc(100% + 6px); max-width: calc(100vw - 24px); }
}
/* phones: form fields in the page's own font (not the browser's default), placeholders and the chosen value in drop-downs
   at 14px, closer to the small field names above them (they were 16px and looked oversized), 2026-11-19. Typed text
   stays 16px so iPhones don't zoom. Fields with their own font or size rule keep it. Phones only. */
@media (max-width: 720px) {
  html body :is(input, select, textarea) { font-family: inherit; }
  html body :is(input, textarea)::placeholder { font-size: min(14px, 1em); }
  html body select:not([multiple]) { font-size: 14px; }
}
/* phones: no "On phone" (scan a QR code to open this on your phone) button in the top bar, since this already is the
   phone (2026-11-19). ui/staff-top.js adds it for staff; laptops keep it. When it was the first button after the logo,
   the next one takes over pushing the group to the right. Phones only, this page only. */
@media (max-width: 720px) {
  html body > header.topbar > .df-tb-phone { display: none; }
  html.df-staff-top body > header.topbar > .brand + .df-tb-phone + * { margin-left: auto; }
}
/* the shared top bar (css/topbar.css, 2026-11-19): the buttons sit in its .top-right group, 8px apart, so the two margin
   rules above (written for the page's own flat bar) don't add to that gap, and "On phone" stays hidden on phones there too.
   This page only. Staff: ui/staff-top.js spaces the buttons itself. */
html:not(.df-staff-top) body > header.topbar.df-bar .top-right > :is([data-profile], .th-toggle, .nt) { margin-left: 0; }
@media (max-width: 720px) {
  html body > header.topbar.df-bar .top-right > .df-tb-phone { display: none; }
}
