
.prebatch-pdf-dialog { box-sizing:border-box; width:min(440px,calc(100% - 32px)); max-height:calc(100dvh - 48px); overflow:auto; padding:22px; border:1px solid var(--pdf-line,#39423f); border-radius:14px; background:var(--pdf-panel,#29302f); color:var(--pdf-text,#f2f3ed); font:15px/1.45 system-ui,sans-serif; color-scheme:inherit; }
.prebatch-pdf-dialog::backdrop { background:rgba(0,0,0,.6); }
.prebatch-pdf-dialog header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.prebatch-pdf-dialog h2 { margin:0; font-size:20px; }
.prebatch-pdf-dialog p { margin:16px 0; overflow-wrap:anywhere; }
.prebatch-pdf-dialog .prebatch-pdf-name { font-weight:600; }
.prebatch-pdf-dialog .prebatch-pdf-help { color:var(--pdf-muted,#acb5ae); font-size:13px; }
.prebatch-pdf-dialog button,.prebatch-pdf-dialog a { box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; min-height:44px; border:1px solid var(--pdf-control,var(--pdf-line)); border-radius:8px; padding:10px 14px; font:inherit; font-weight:600; text-decoration:none; color:inherit; background:transparent; cursor:pointer; }
.prebatch-pdf-dialog [hidden] { display:none; }
.prebatch-pdf-dialog button:disabled { opacity:.6; cursor:wait; }
.prebatch-pdf-dialog button:focus-visible,.prebatch-pdf-dialog a:focus-visible { outline:2px solid var(--pdf-accent,#b54e2d); outline-offset:3px; }
.prebatch-pdf-dialog [data-pdf-close] { flex:none; width:44px; padding:0; border:0; font-size:26px; }
.prebatch-pdf-dialog [data-pdf-share] { background:var(--pdf-accent,#b54e2d); color:var(--pdf-accent-ink,#fff); border-color:transparent; }
.prebatch-pdf-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; }
.prebatch-pdf-actions>* { flex:1; white-space:nowrap; }
.prebatch-recipe-share-dialog [data-pdf-status] { min-height:1.45em; margin:12px 0 0; color:var(--pdf-muted); }
.prebatch-recipe-share-dialog .prebatch-pdf-actions { margin-top:12px; }
.prebatch-recipe-share-dialog [aria-disabled="true"] { opacity:.6; cursor:default; }
.prebatch-recipe-share-dialog [data-pdf-retry] { flex-basis:100%; }
.production-file-dialog { width:min(360px,calc(100% - 32px)); padding:22px; }
.production-file-dialog header { gap:8px; }
.production-file-dialog h2 { font-size:18px; }
.production-file-dialog [data-close] { flex:none; width:32px; min-height:32px; padding:0; border:0; font-size:24px; }
.production-file-dialog [data-description] { margin:8px 0 0; color:var(--pdf-muted,#acb5ae); }
.production-file-dialog :is([data-status],[data-help]):empty { display:none; }
.production-file-dialog .prebatch-pdf-actions { flex-direction:column; gap:8px; margin-top:20px; }
.production-file-dialog .prebatch-pdf-actions>* { flex:none; width:100%; height:44px; }
.production-file-dialog [data-share] { background:var(--pdf-accent); color:var(--pdf-accent-ink); border-color:transparent; }

:root[data-interface-theme="berrywood"]{--prebatch-material-tint:#bea294;}:root[data-interface-theme="bulgakov"]{--prebatch-material-tint:#39718a;}:root[data-interface-theme="sadko"]{--prebatch-material-tint:#96cabd;}:root[data-interface-theme="tunguska"]{--prebatch-material-tint:#A9C29F;}
/* Host aliases use the same material declarations as the iframe. Embedded auth
   forms are transparent; only the auth panel is a standalone surface. */
:root :is(.prebatch-pdf-dialog, .prebatch-auth-panel) {
  --ttk-panel:var(--pdf-panel); --ttk-panel-soft:var(--pdf-panel-soft);
  --ttk-text:var(--pdf-text); --ttk-line:var(--pdf-line);
  --ttk-accent:var(--pdf-accent); --ttk-good:var(--pdf-good);
  --ttk-material-tint:var(--prebatch-material-tint,var(--pdf-good));
}
/* Approved Liquid Glass, shared by all modules. Change material, never geometry.
   Theme colors stay opaque: inputs, numeric facts and tables keep their contrast. */
:is(#ttk-app-mockup, .prebatch-pdf-dialog, .prebatch-auth-panel) {
  --ttk-glass-panel: var(--ttk-panel);
  --ttk-glass-chrome: var(--ttk-panel-soft);
  --ttk-glass-menu: var(--ttk-panel);
  --ttk-glass-filter: none;
  --ttk-glass-image: none;
  --ttk-glass-chrome-image: none;
  --ttk-glass-menu-image: linear-gradient(135deg, #ffffff13, transparent 48%);
  --ttk-glass-control-image: linear-gradient(145deg, #ffffff18, transparent 60%);
  --ttk-glass-active-image: linear-gradient(145deg, #ffffff40, #ffffff08 48%, #ffffff18);
  --ttk-glass-rim: color-mix(in srgb, var(--ttk-text) 32%, var(--ttk-line));
  --ttk-glass-panel-shadow: inset 0 1px 0 #ffffff70, inset 1px 0 0 #ffffff20, inset 0 -1px 0 #ffffff24, 0 20px 48px #0004;
  --ttk-glass-chrome-shadow: inset 0 1px 0 #ffffff66, inset 0 -1px 0 #ffffff1a, 0 -8px 24px #0003;
  --ttk-glass-menu-shadow: inset 0 1px 0 #ffffff50, 0 12px 28px #0004;
  --ttk-glass-tile-shadow: inset 0 1px 0 #ffffff30;
  --ttk-glass-active-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ttk-accent) 55%, transparent), inset 0 1px 0 #ffffff88, inset 0 -1px 0 #ffffff26, 0 3px 8px #0002;
}
@supports ((backdrop-filter: blur(18px)) or (-webkit-backdrop-filter: blur(18px))) {
  :is(#ttk-app-mockup, .prebatch-pdf-dialog, .prebatch-auth-panel) {
    --ttk-glass-panel: color-mix(in srgb, var(--ttk-panel) 58%, transparent);
    --ttk-glass-chrome: color-mix(in srgb, var(--ttk-panel-soft) 54%, transparent);
    --ttk-glass-menu: color-mix(in srgb, var(--ttk-panel) 96%, transparent);
    --ttk-glass-filter: blur(18px) saturate(1.45);
    --ttk-glass-image: linear-gradient(125deg, #ffffff38, #ffffff08 28%, transparent 52%, #ffffff10), radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--ttk-good) 14%, transparent), transparent 58%);
    --ttk-glass-chrome-image: linear-gradient(165deg, #ffffff30, #ffffff06 48%, #ffffff12);
  }
}
/* The approved Bulgakov material is shared; palette tokens only supply colors. */
:is(#ttk-app-mockup, .prebatch-pdf-dialog, .prebatch-auth-panel) {
  --ttk-glass-rim: color-mix(in srgb, var(--ttk-accent) 22%, var(--ttk-line));
  --ttk-glass-menu-image: linear-gradient(135deg, color-mix(in srgb, var(--ttk-accent) 4.706%, transparent), transparent 48%);
  --ttk-glass-control-image: linear-gradient(145deg, color-mix(in srgb, var(--ttk-text) 8.627%, transparent), transparent 60%);
  --ttk-glass-active-image: linear-gradient(145deg, color-mix(in srgb, var(--ttk-accent) 18.824%, transparent), color-mix(in srgb, var(--ttk-accent) 3.137%, transparent) 70%);
}
@supports ((backdrop-filter: blur(18px)) or (-webkit-backdrop-filter: blur(18px))) {
  :is(#ttk-app-mockup, .prebatch-pdf-dialog, .prebatch-auth-panel) {
    --ttk-glass-image: linear-gradient(125deg, color-mix(in srgb, var(--ttk-text) 14.902%, transparent), transparent 52%), radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--ttk-material-tint) 14.902%, transparent), transparent 58%);
    --ttk-glass-chrome-image: linear-gradient(165deg, color-mix(in srgb, var(--ttk-accent) 9.412%, transparent), transparent 64%, color-mix(in srgb, var(--ttk-material-tint) 7.059%, transparent));
  }
}
/* Independent card shells. Embedded React/detail wrappers are intentionally omitted. */
#ttk-app-mockup :is(
  .ttk-list,
  .ttk-detail:where(:not(.ttk-cocktail-dialog *)):where(:not(:has(.cc-card))),
  .ttk-form,
  .cc-card:where(:not(.ttk-cocktail-dialog *)),
  .ttk-drafts, .ttk-reference-panel, .ttk-settings, .pb-schedule-sheet, .pb-schedule-confirm,
  .ttk-directory-list:where(:not(.ttk-settings *, .ttk-reference-panel *)),
  .il-root, .so-storage-group, .so-supplier-group,
  .ttk-cocktail-dialog, .ttk-modal-card, .ttk-smorfin-semi-dialog,
  .ttk-cocktail-delete-dialog, .il-dialog, .sl-dialog, .sp-dialog, .sp-confirm, .lab-confirm,
  .ttk-recipe-semi-dialog, .pv-dialog, .dw-dialog, .pb-staff-invite
),
:root :is(.prebatch-pdf-dialog:where([open]):where(:not(.prebatch-auth-content *)), .prebatch-auth-panel) {
  background-color: var(--ttk-glass-panel);
  background-image: var(--ttk-glass-image);
  border-color: var(--ttk-glass-rim);
  box-shadow: var(--ttk-glass-panel-shadow);
  -webkit-backdrop-filter: var(--ttk-glass-filter);
  backdrop-filter: var(--ttk-glass-filter);
}
/* Never put blur on .ttk-window/.ttk-main/.ttk-content: they contain fixed overlays. */
#ttk-app-mockup :is(.ttk-header, .ttk-sidebar) {
  background-color: var(--ttk-glass-chrome);
  background-image: var(--ttk-glass-chrome-image);
  border-color: var(--ttk-glass-rim);
  box-shadow: var(--ttk-glass-chrome-shadow);
  -webkit-backdrop-filter: var(--ttk-glass-filter);
  backdrop-filter: var(--ttk-glass-filter);
}
/* A filtered grid item is a stacking context. Keep sidebar tooltips above the
   main pane/header (z2), below existing overlays (z20) and the native top layer. */
@media (min-width: 721px) {
  #ttk-app-mockup .ttk-sidebar { z-index: 3; }
}
/* One menu surface, no additional GPU blur and no changes to portal/position rules. */
#ttk-app-mockup :is(.bf-ui.bf-select-content, .il-types-popover, .il-type-options,
  .ttk-catalog-classification-options, .ttk-reference-directory-menu, .ttk-position-menu, .cc-options) {
  background-color: var(--ttk-glass-menu);
  background-image: var(--ttk-glass-menu-image);
  border-color: var(--ttk-glass-rim);
  box-shadow: var(--ttk-glass-menu-shadow);
}
/* Repeated tiles and controls reflect light, but retain semantic base/hover colors.
   Do not target native selects: their background image is the disclosure chevron. */
#ttk-app-mockup :is(.ttk-gallery-tile, .ttk-draft-card, .ttk-setting-option) {
  background-image: var(--ttk-glass-control-image);
}
#ttk-app-mockup :is(.ttk-primary, .ttk-secondary, .ttk-photo-action, .ttk-filter-chip,
  .il-types-trigger, .ttk-catalog-classification > summary) {
  background-image: var(--ttk-glass-control-image);
}
#ttk-app-mockup :is(.ttk-gallery-tile, .ttk-draft-card) { box-shadow: var(--ttk-glass-tile-shadow); }
#ttk-app-mockup :is(.ttk-nav, .ttk-sidebar-bottom) button[aria-current="page"] {
  background-color: var(--ttk-accent-soft);
  background-image: var(--ttk-glass-active-image);
  box-shadow: var(--ttk-glass-active-shadow);
  color: var(--ttk-text);
}
@media (max-width: 720px) {
  #ttk-app-mockup :is(.ttk-nav, .ttk-sidebar-bottom) button[aria-current="page"]::after { color: var(--ttk-text); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more), (forced-colors: active) {
  :is(#ttk-app-mockup, .prebatch-pdf-dialog, .prebatch-auth-panel) {
    --ttk-glass-panel: var(--ttk-panel);
    --ttk-glass-chrome: var(--ttk-panel-soft);
    --ttk-glass-menu: var(--ttk-panel);
    --ttk-glass-filter: none;
    --ttk-glass-image: none;
    --ttk-glass-chrome-image: none;
    --ttk-glass-menu-image: none;
    --ttk-glass-control-image: none;
    --ttk-glass-active-image: none;
    --ttk-glass-rim: var(--ttk-line);
    --ttk-glass-panel-shadow: none;
    --ttk-glass-chrome-shadow: none;
    --ttk-glass-menu-shadow: none;
    --ttk-glass-tile-shadow: none;
    --ttk-glass-active-shadow: inset 0 0 0 1px var(--ttk-accent);
  }
}
@media (forced-colors: active) {
  :is(#ttk-app-mockup, .prebatch-pdf-dialog, .prebatch-auth-panel) {
    --ttk-glass-panel: Canvas;
    --ttk-glass-chrome: Canvas;
    --ttk-glass-menu: Canvas;
    --ttk-glass-rim: CanvasText;
    --ttk-glass-active-shadow: none;
  }
  #ttk-app-mockup :is(.ttk-nav, .ttk-sidebar-bottom) button[aria-current="page"] {
    background: Canvas; color: CanvasText; outline: 2px solid Highlight; outline-offset: -2px;
  }
}

:root .prebatch-pdf-dialog::backdrop { background:color-mix(in srgb,var(--pdf-bg) 60%,transparent); }

/* The existing Radix select is shared across staff forms and host dialogs. */
.prebatch-session-dialog select[data-recipe-select-native] { display:none!important; }
.prebatch-session-dialog .bf-legacy-select-host { display:block; min-width:0; }
.prebatch-session-dialog .bf-legacy-select-host[hidden] { display:none; }
.prebatch-session-dialog .bf-select-trigger,
#ttk-app-mockup .pb-staff .bf-select-trigger {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  width:100%; height:auto; min-width:0; min-height:44px; font:inherit;
}
.prebatch-session-dialog .bf-select-trigger [data-slot="select-value"],
#ttk-app-mockup .pb-staff .bf-select-trigger [data-slot="select-value"] {
  min-width:0; white-space:normal; overflow-wrap:anywhere; text-align:left;
}
.prebatch-session-dialog .bf-select-chevron { width:14px; height:14px; flex:none; }
.prebatch-account-dialog .prebatch-panel-select-row>.bf-legacy-select-host { position:absolute; inset:0; }
.prebatch-account-dialog .prebatch-panel-select-row .bf-select-trigger {
  width:100%; height:100%; padding:0; border:0; border-radius:0; background:transparent;
}
/* Caption and wrapping value already belong to the whole panel row. */
.prebatch-account-dialog .prebatch-panel-select-row .bf-select-trigger>* { opacity:0; }
.prebatch-account-dialog .prebatch-panel-select-row .bf-select-trigger:focus-visible { outline:0; }
.prebatch-account-dialog .prebatch-panel-select-row:has(button:disabled) { opacity:.6; cursor:default; }
.prebatch-session-dialog .bf-select-trigger:focus-visible { outline:2px solid var(--pdf-accent); outline-offset:2px; }
:is(.prebatch-session-dialog,#ttk-app-mockup) .bf-ui.prebatch-choice-list {
  box-sizing:border-box; z-index:100; width:var(--radix-select-trigger-width);
  min-width:min(var(--radix-select-trigger-width),var(--radix-select-content-available-width));
  max-width:min(calc(100vw - 32px),var(--radix-select-content-available-width)); max-height:min(280px,var(--radix-select-content-available-height));
  overflow:hidden; padding:5px; border:1px solid var(--ttk-glass-rim); border-radius:9px;
  background-color:var(--ttk-glass-menu); background-image:var(--ttk-glass-menu-image);
  box-shadow:var(--ttk-glass-menu-shadow); color:var(--ttk-text); font:inherit;
}
:is(.prebatch-session-dialog,#ttk-app-mockup) .prebatch-choice-list .bf-select-viewport { width:100%; }
:is(.prebatch-session-dialog,#ttk-app-mockup) .prebatch-choice-list .bf-select-item {
  position:relative; display:flex; align-items:center; box-sizing:border-box; min-height:44px;
  padding:8px 32px 8px 10px; border-radius:5px; outline:0; user-select:none;
  white-space:normal; overflow-wrap:anywhere; cursor:default;
}
:is(.prebatch-session-dialog,#ttk-app-mockup) .prebatch-choice-list .bf-select-item[data-highlighted] { background:color-mix(in srgb,var(--ttk-accent) 18%,transparent); }
:is(.prebatch-session-dialog,#ttk-app-mockup) .prebatch-choice-list .bf-select-item[data-disabled] { opacity:.5; pointer-events:none; }
.prebatch-choice-list .bf-select-indicator { position:absolute; right:8px; display:flex; align-items:center; }
.prebatch-choice-list :is(.bf-select-indicator,.bf-select-scroll) svg { width:14px; height:14px; }
.prebatch-choice-list .bf-select-scroll { display:flex; justify-content:center; align-items:center; min-height:24px; }
@media(forced-colors:active) {
  :is(.prebatch-session-dialog,#ttk-app-mockup) .prebatch-choice-list .bf-select-item[data-highlighted] { background:Highlight; color:HighlightText; }
}

/* Role choice shares the approved panel material, including opaque fallback. */
.bf-ui.prebatch-role-dialog {
  box-sizing:border-box; width:360px; max-width:calc(100vw - 32px);
  max-height:calc(100dvh - 32px); padding:20px; margin:auto;
  border:1px solid var(--ttk-glass-rim,var(--ttk-line)); border-radius:14px;
  background-color:var(--ttk-glass-panel,var(--ttk-panel)); background-image:var(--ttk-glass-image);
  -webkit-backdrop-filter:var(--ttk-glass-filter); backdrop-filter:var(--ttk-glass-filter);
  color:var(--ttk-text); box-shadow:var(--ttk-glass-panel-shadow); font:inherit;
  overflow:hidden;
}
.bf-ui.prebatch-role-dialog[open] { display:flex; flex-direction:column; }
.bf-ui.prebatch-role-dialog::backdrop { background:#0008; }
/* The account dialog already dims the page; avoid stacking a second dark veil. */
.prebatch-account-dialog .prebatch-role-dialog::backdrop { background:transparent; }
.bf-ui.prebatch-role-dialog>header { display:flex; align-items:center; gap:12px; flex:none; margin:0; padding:0 0 12px; border-bottom:1px solid var(--ttk-line); }
.bf-ui.prebatch-role-dialog h2 { flex:1; min-width:0; margin:0; padding:0; font:inherit; font-size:20px; font-weight:600; overflow-wrap:anywhere; }
.bf-ui.prebatch-role-dialog button { box-sizing:border-box; min-height:44px; margin:0; border:0; border-radius:8px; background:transparent; color:inherit; font:inherit; cursor:pointer; }
.bf-ui.prebatch-role-dialog button:focus-visible { outline:2px solid var(--ttk-accent); outline-offset:-2px; }
.bf-ui.prebatch-role-dialog button:disabled { opacity:.5; cursor:default; }
.bf-ui.prebatch-role-dialog [data-close] { display:grid; place-items:center; flex:none; width:44px; padding:0; }
.bf-ui.prebatch-role-dialog svg { width:20px; height:20px; flex:none; }
.bf-ui.prebatch-role-dialog .prebatch-role-options { min-height:0; min-width:0; overflow-y:auto; overscroll-behavior:contain; padding:8px 0 0; }
.bf-ui.prebatch-role-dialog [data-choice] { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; padding:10px 8px; text-align:left; }
.bf-ui.prebatch-role-dialog [data-choice]+[data-choice] { border-top:1px solid var(--ttk-line); border-radius:0; }
.bf-ui.prebatch-role-dialog [data-choice]>span { min-width:0; overflow-wrap:anywhere; }
.bf-ui.prebatch-role-dialog [aria-pressed=true] { color:var(--ttk-accent); }
@media(hover:hover) and (pointer:fine) { .bf-ui.prebatch-role-dialog [data-choice]:not(:disabled):hover { background:var(--ttk-panel-soft); } }
@media(forced-colors:active) { .bf-ui.prebatch-role-dialog { background:Canvas; color:CanvasText; border-color:CanvasText; } }
