/* Recipe library v2: task lists first, separate sellable and component views. */
body[data-product-workspace="cost"] { --recipe-ink: #20242b; --recipe-muted: #677282; }
body[data-product-workspace="cost"] .modal-backdrop { z-index: 1100 !important; }
body[data-product-workspace="cost"] :is(#amountFormulaModal, #aiFormulaModal, #newProductImagePreviewModal) { z-index: 1150 !important; }
body[data-product-workspace="cost"] #toastRegion { z-index: 1180 !important; }
body[data-product-workspace="cost"] [hidden] { display: none !important; }
body.product-technology-v2[data-product-workspace="cost"] :is(#productModal, #recipesView, #sidebar) [hidden] { display: none !important; }
body[data-product-workspace="cost"] .topbar { border-radius: 14px !important; padding: 18px 22px !important; box-shadow: none !important; }
body[data-product-workspace="cost"] .topbar h1 { font-size: 26px !important; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
body[data-product-workspace="cost"] .page-description { font-size: 14px !important; line-height: 1.6; }
body[data-product-workspace="cost"] .content { padding-top: 16px !important; }
body[data-product-workspace="cost"] #productModuleNav > :is(.nav-label, .is-current) { display: none; }
body[data-product-workspace="cost"] .nav-subgroup-label { margin: 12px 8px 4px; color: #77818d; font-size: 12px; font-weight: 500; }
body[data-product-workspace="cost"] .main-nav :is(.nav-item, .nav-subitem) { font-size: 15px !important; }
body[data-product-workspace="cost"] .main-nav .nav-label { font-size: 12px !important; letter-spacing: 0; }
body[data-product-workspace="cost"] .nav-sub-count { font-size: 12px !important; white-space: nowrap; }
body[data-product-workspace="cost"] #recipesView > .section-tabs { display: none; }
body[data-product-workspace="cost"] #recipesView > .recipe-summary-strip { display: flex !important; flex-wrap: wrap; gap: 8px 24px; padding: 8px 2px; margin: 0 0 10px !important; }
body[data-product-workspace="cost"] #recipesView .recipe-summary-strip .mini-metric { display: inline-flex !important; flex-direction: row !important; align-items: baseline; gap: 8px; min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }
body[data-product-workspace="cost"] #recipesView .recipe-summary-strip .mini-metric span { font-size: 13px !important; color: var(--recipe-muted); }
body[data-product-workspace="cost"] #recipesView .recipe-summary-strip .mini-metric strong { font-size: 15px !important; color: var(--recipe-ink); }
body[data-product-workspace="cost"] #recipesView .product-library-panel { border-radius: 14px !important; box-shadow: none !important; padding: 0 !important; }
body[data-product-workspace="cost"] #recipesView .table-toolbar { position: static !important; display: flex !important; flex-direction: column; align-items: stretch; gap: 10px; padding: 16px !important; margin: 0 !important; border: 0 !important; border-radius: 14px 14px 0 0 !important; box-shadow: none !important; background: #fff !important; }
body[data-product-workspace="cost"] #recipesView .filter-stack { flex: 1; width: 100%; min-width: 0; }
body[data-product-workspace="cost"] #recipesView .filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
body[data-product-workspace="cost"] #recipesView .filter-row .search-box { flex: 1 1 270px; min-width: 180px; max-width: 520px; }
body[data-product-workspace="cost"] #recipesView .filter-row .select-control { flex: 0 1 155px; width: 155px; min-width: 0 !important; }
body[data-product-workspace="cost"] #recipesView :is(input, select) { font-size: 15px !important; }
body[data-product-workspace="cost"] #recipesView :is(.search-box, .select-control) { min-height: 42px !important; border-radius: 9px !important; box-shadow: none !important; }
body[data-product-workspace="cost"] #recipesView .toolbar-actions { display: flex !important; flex-wrap: wrap !important; justify-content: flex-start; gap: 10px; width: 100%; max-width: 100%; overflow: visible !important; }
body[data-product-workspace="cost"] #recipesView .button { font-size: 14px !important; min-height: 40px; padding: 9px 13px !important; border-radius: 8px !important; box-shadow: none !important; white-space: normal !important; }
body[data-product-workspace="cost"] #recipesView :is(.recipe-advanced-filters, .recipe-library-tools) > summary { cursor: pointer; font-size: 14px; color: #526072; min-height: 32px; line-height: 32px; }
body[data-product-workspace="cost"] #recipesView .recipe-advanced-filters { margin-top: 0; flex: 0 0 auto; }
body[data-product-workspace="cost"] #recipesView .range-filter-row { flex-wrap: wrap; margin: 8px 0 0; }
body[data-product-workspace="cost"] #recipesView .recipe-library-tools { flex: 0 0 auto; }
body[data-product-workspace="cost"] #recipesView :is(.recipe-advanced-filters, .recipe-library-tools)[open] { flex: 1 1 100%; }
body[data-product-workspace="cost"] #recipesView .recipe-tools-content { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; }
body[data-product-workspace="cost"] #recipesView .recipe-selection-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 100%; padding: 12px; border: 1px solid #d9e6f8; border-radius: 9px; background: #f5f9ff; }
body[data-product-workspace="cost"] #recipesView .selection-summary { font-size: 14px !important; }
body[data-product-workspace="cost"] #productsTableContainer { padding: 0 16px 12px; }
body[data-product-workspace="cost"] #productsTableContainer .table-sort-note { position: static !important; font-size: 12px; padding: 10px 0; }
body[data-product-workspace="cost"] #recipesView .birthday-selection-bar { margin: 10px 0; padding: 10px 12px; border-radius: 8px; background: #f8f9fb; }
body[data-product-workspace="cost"] #recipesView .birthday-selection-bar strong { font-size: 14px; }
body[data-product-workspace="cost"] #recipesView :is(.table-pagination, .birthday-selection-actions) { font-size: 13px !important; }
body[data-product-workspace="cost"] #recipesView .product-cost-title strong { font-size: 16px !important; line-height: 1.5 !important; }
body[data-product-workspace="cost"] #recipesView .product-cost-source { display: none; }
body[data-product-workspace="cost"] #recipesView .product-cost-identity-cell .product-cost-badges > :is(.complete, .archived) { display: none; }
body[data-product-workspace="cost"] #recipesView .row-button { font-size: 14px !important; min-height: 36px; white-space: normal !important; word-break: normal !important; padding: 7px 9px !important; border-radius: 7px !important; box-shadow: none !important; }
body[data-product-workspace="cost"] #recipesView .product-cost-status-stack time { font-size: 12px; }
body[data-product-workspace="cost"] #recipesView .birthday-fold-card { grid-template-columns: minmax(200px, 1.3fr) minmax(210px, 1fr) minmax(250px, 1fr) !important; gap: 16px !important; padding: 12px 6px !important; }
body[data-product-workspace="cost"] #recipesView .birthday-fold-title-block strong { font-size: 17px !important; }
body[data-product-workspace="cost"] #recipesView .birthday-fold-metrics { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px 14px; align-content: start; }
body[data-product-workspace="cost"] #recipesView .birthday-fold-metric { min-width: 0; padding: 0 !important; background: none !important; border: 0 !important; }
body[data-product-workspace="cost"] #recipesView .birthday-fold-metric small { font-size: 12px !important; }
body[data-product-workspace="cost"] #recipesView .birthday-money-range { flex-wrap: wrap !important; font-size: 15px !important; }
body[data-product-workspace="cost"] #recipesView .birthday-pricing-reference { grid-column: 1/-1; font-size: 13px; color: #5e6a79; }
body[data-product-workspace="cost"] #recipesView .birthday-pricing-reference summary { cursor: pointer; padding: 6px 0; }
body[data-product-workspace="cost"] #recipesView .birthday-pricing-reference > div { display: grid; gap: 12px; padding-top: 6px; }
body[data-product-workspace="cost"] #recipesView .birthday-fold-row > td { background: #fff !important; }
body[data-product-workspace="cost"] #recipesView .birthday-fold-row:hover > td { background: #f7faff !important; }
body[data-product-workspace="cost"] #recipesView .birthday-fold-side { align-content: start; }
body[data-product-workspace="cost"] #recipesView .birthday-fold-side > small { display: none; }
/* Match the legacy card layer's specificity inside this dedicated document. */
body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .responsive-product-table :is(.row-button, .product-cost-title strong) { font-size: 15px !important; }
body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .responsive-product-table .product-cost-title strong { font-size: 16px !important; }
body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .responsive-product-table .product-cost-summary-row > td::before { font-size: 12px !important; line-height: 1.5 !important; }
body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .responsive-product-table .product-cost-status-stack :is(small,time) { font-size: 11px !important; }
body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .birthday-fold-card { grid-template-columns: minmax(200px, 1.3fr) minmax(240px, 1fr) minmax(250px, 1fr) !important; gap: 16px !important; }
body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .birthday-fold-metrics { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 8px 14px !important; }
body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .birthday-fold-summary-cell { background: #fff !important; }
body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .birthday-fold-action-row .row-button { font-size: 14px !important; padding: 7px 9px !important; }
body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .birthday-fold-side { justify-content: flex-start !important; }
/* Components never display empty sales-price or profit fields. */
body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .cake-base-recipe-table tbody tr.product-cost-summary-row > td:is(.image-cell, .product-cost-pricing-cell, .product-cost-average-cell, .product-cost-actual-cell),
body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .cake-base-recipe-table :is(.col-image, .col-suggested, .col-average, .col-actual),
body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .cake-base-recipe-table thead th:is(:nth-child(2), :nth-child(6), :nth-child(7), :nth-child(8)),
body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .dessert-recipe-table tbody tr.product-cost-summary-row > td:is(.product-cost-pricing-cell, .product-cost-average-cell),
body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .dessert-recipe-table :is(.col-suggested, .col-average),
body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .dessert-recipe-table thead th:is(:nth-child(6), :nth-child(7)) { display: none !important; }
body[data-product-workspace="cost"] #recipesView .cake-base-recipe-table .product-cost-title .size-chip { display: inline-flex; }
@media (min-width: 901px) {
  body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .cake-base-recipe-table tbody tr.product-cost-summary-row { grid-template-columns: 30px minmax(0, 2.3fr) minmax(0, .7fr) minmax(0, .9fr) minmax(0, 1fr) minmax(220px, 1.7fr) !important; }
  body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .cake-base-recipe-table tbody tr.product-cost-summary-row > td { grid-row: 1 !important; }
  body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .cake-base-recipe-table tbody tr.product-cost-summary-row > td.product-cost-identity-cell { grid-column: 2 !important; }
  body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .cake-base-recipe-table tbody tr.product-cost-summary-row > td.product-cost-formula-cell { grid-column: 3 !important; }
  body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .cake-base-recipe-table tbody tr.product-cost-summary-row > td.product-cost-total-cell { grid-column: 4 !important; }
  body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .cake-base-recipe-table tbody tr.product-cost-summary-row > td.product-cost-status-cell { grid-column: 5 !important; }
  body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .cake-base-recipe-table tbody tr.product-cost-summary-row > td.product-cost-actions-cell { grid-column: 6 !important; }
  body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .dessert-recipe-table tbody tr.product-cost-summary-row { grid-template-columns: 30px 70px minmax(160px, 2fr) minmax(70px, .7fr) minmax(85px, .8fr) minmax(85px, .8fr) minmax(100px, 1fr) minmax(200px, 1.6fr) !important; }
  body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .dessert-recipe-table tbody tr.product-cost-summary-row > td { grid-row: 1 !important; }
  body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .dessert-recipe-table tbody tr.product-cost-summary-row > td.product-cost-actual-cell { grid-column: 6 !important; }
  body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .dessert-recipe-table tbody tr.product-cost-summary-row > td.product-cost-status-cell { grid-column: 7 !important; }
  body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .dessert-recipe-table tbody tr.product-cost-summary-row > td.product-cost-actions-cell { grid-column: 8 !important; }
}
/* Wide editing sheet: sections use the full available width; save stays in view. */
body[data-product-workspace="cost"] #productModal { padding: 12px; }
body[data-product-workspace="cost"] #productModal .modal-editor { width: min(1640px, calc(100vw - 24px)) !important; height: calc(100dvh - 24px); max-height: calc(100dvh - 24px) !important; border-radius: 14px !important; display: flex; flex-direction: column; }
body[data-product-workspace="cost"] #productModal .modal-header { padding: 14px 22px !important; gap: 14px; flex: 0 0 auto; background: #fff !important; }
body[data-product-workspace="cost"] #productModal .modal-header h2 { font-size: 22px !important; }
body[data-product-workspace="cost"] #productModal .modal-header .section-kicker { display: none; }
body[data-product-workspace="cost"] #productModal .product-modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; max-height: none !important; background: #f7f8fa !important; }
body[data-product-workspace="cost"] #productModal .product-editor-layout { display: block !important; min-height: 0; }
body[data-product-workspace="cost"] #productModal .product-editor-rail { position: static !important; min-height: 0 !important; padding: 14px 22px !important; background: #fff !important; box-shadow: none !important; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid #e4e8ee; }
body[data-product-workspace="cost"] #productModal .editor-preview-details > summary { cursor: pointer; font-size: 14px; color: #526072; }
body[data-product-workspace="cost"] #productModal .editor-preview-details .editor-product-preview { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 20px; padding: 14px; margin-top: 10px; border: 1px solid #e0e6ef; border-radius: 10px; box-shadow: none; background: #fff; }
body[data-product-workspace="cost"] #productModal .editor-image-card { grid-row: span 5; }
body[data-product-workspace="cost"] #productModal .editor-step-nav { display: flex !important; flex-wrap: wrap; gap: 10px; margin: 0; }
body[data-product-workspace="cost"] #productModal .editor-step-nav button { flex: 1 1 190px; min-width: 0; padding: 10px 12px; min-height: 48px; display: flex !important; align-items: center; gap: 10px; }
body.product-technology-v2[data-product-workspace="cost"] #productModal .editor-step-nav button[hidden] { display: none !important; }
body[data-product-workspace="cost"] #productModal .editor-step-nav small { display: none; }
body[data-product-workspace="cost"] #productModal .editor-step-nav strong { font-size: 14px; }
body[data-product-workspace="cost"] #productModal .editor-import-note { display: none; }
body[data-product-workspace="cost"] #productModal .product-editor-main { padding: 20px 22px; width: 100%; min-width: 0; box-sizing: border-box; }
body[data-product-workspace="cost"] #productModal :is(input, select, textarea) { font-size: 15px !important; min-width: 0; }
body.product-technology-v2[data-product-workspace="cost"] #productModal .form-grid > label > span { font-size: 14px !important; line-height: 1.5 !important; }
body.product-technology-v2[data-product-workspace="cost"] #productModal :is(.form-grid small, .form-section-title p, .modal-header p) { font-size: 12px !important; line-height: 1.6 !important; }
body[data-product-workspace="cost"] #productModal .modal-footer { flex: 0 0 auto; padding: 12px 22px !important; background: #fff !important; }
body[data-product-workspace="cost"] #productModal .editor-size-switch-control { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 14px; min-width: 0; }
body[data-product-workspace="cost"] #productModal .editor-size-switch-control select { width: 160px; min-height: 42px; padding: 8px; }
@media (max-width: 1199px) {
  body.product-technology-v2[data-product-workspace="cost"] #recipesView #productsTableContainer .birthday-fold-card { grid-template-columns: minmax(0,1fr) !important; }
  body[data-product-workspace="cost"] #recipesView .birthday-fold-card { grid-template-columns: minmax(0, 1fr) !important; }
  body[data-product-workspace="cost"] #recipesView .birthday-fold-side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  body[data-product-workspace="cost"] #recipesView .birthday-fold-action-row { width: 100%; }
}
@media (max-width: 760px) {
  body.product-technology-v2[data-product-workspace="cost"] #recipesView.view .table-toolbar.mobile-filter-toolbar { max-height: none !important; height: auto !important; overflow: visible !important; flex-flow: column nowrap !important; }
  body.product-technology-v2[data-product-workspace="cost"] #recipesView.view .table-toolbar.mobile-filter-toolbar :is(.filter-stack, .toolbar-actions) { flex: 0 1 auto !important; width: 100% !important; max-width: 100% !important; }
  body.product-technology-v2[data-product-workspace="cost"] #recipesView.view .table-toolbar.mobile-filter-toolbar .filter-row .search-box { position: relative !important; }
  body.product-technology-v2[data-product-workspace="cost"] #recipesView.view .table-toolbar.mobile-filter-toolbar .filter-row .search-box svg { position: static !important; flex: 0 0 18px; transform: none !important; }
  body[data-product-workspace="cost"] .topbar { padding: 12px !important; }
  body[data-product-workspace="cost"] .topbar h1 { font-size: 23px !important; }
  body[data-product-workspace="cost"] .topbar .page-description { display: none; }
  body[data-product-workspace="cost"] #recipesView .mobile-filter-toggle { display: none !important; }
  body[data-product-workspace="cost"] #recipesView .table-toolbar .filter-stack,
  body[data-product-workspace="cost"] #recipesView .table-toolbar .toolbar-actions { display: flex !important; opacity: 1 !important; visibility: visible !important; }
  body[data-product-workspace="cost"] #recipesView .table-toolbar .filter-stack { flex-direction: column; }
  body[data-product-workspace="cost"] #recipesView .filter-row .search-box { flex-basis: 100%; max-width: none; }
  body[data-product-workspace="cost"] #recipesView .filter-row .select-control { flex: 1 1 130px; width: auto; }
  body[data-product-workspace="cost"] #recipesView .range-filter-row > .price-range-filter { flex: 1 1 100%; min-width: 0; }
  body[data-product-workspace="cost"] #productsTableContainer { padding: 0 10px 10px; }
  body[data-product-workspace="cost"] #recipesView .birthday-fold-card { padding: 6px !important; }
  body[data-product-workspace="cost"] #recipesView .birthday-fold-metric { text-align: left; }
  body[data-product-workspace="cost"] #productModal { padding: 0; }
  body[data-product-workspace="cost"] #productModal .modal-editor { width: 100vw !important; height: 100dvh; max-height: 100dvh !important; border-radius: 0 !important; }
  body[data-product-workspace="cost"] #productModal .modal-header { flex-wrap: wrap; padding: 12px !important; }
  body[data-product-workspace="cost"] #productModal .modal-header p { display: none; }
  body[data-product-workspace="cost"] #productModal .editor-size-switch-control { order: 3; flex-basis: 100%; margin: 0; }
  body[data-product-workspace="cost"] #productModal :is(.product-editor-rail, .product-editor-main) { padding: 12px !important; }
  body[data-product-workspace="cost"] #productModal .editor-step-nav button { flex: 1 1 110px; }
  body.product-technology-v2[data-product-workspace="cost"] #productModal .editor-step-nav button div { display: block !important; }
  body.product-technology-v2[data-product-workspace="cost"] #productModal .editor-step-nav button { padding: 8px 6px !important; gap: 6px !important; }
  body.product-technology-v2[data-product-workspace="cost"] #productModal .editor-step-nav button > span { width: 24px !important; height: 24px !important; flex: 0 0 24px !important; }
  body.product-technology-v2[data-product-workspace="cost"] #productModal .editor-step-nav button strong { font-size: 13px !important; white-space: nowrap; }
  body[data-product-workspace="cost"] #productModal .form-grid { grid-template-columns: minmax(0, 1fr) !important; }
  body[data-product-workspace="cost"] #productModal .form-grid > label { grid-column: 1/-1 !important; }
  body[data-product-workspace="cost"] #productModal .editor-preview-details .editor-product-preview { display: block; }
  body[data-product-workspace="cost"] #productModal .modal-footer { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important; flex-wrap: wrap; gap: 8px; }
  body[data-product-workspace="cost"] #productModal .modal-footer .modal-hint { flex-basis: 100%; font-size: 12px; }
  body.product-technology-v2[data-product-workspace="cost"] #productModal .modal-footer { display: flex !important; flex-direction: column !important; align-items: stretch !important; min-width: 0; }
  body.product-technology-v2[data-product-workspace="cost"] #productModal .modal-footer > .modal-hint { flex: 0 0 auto !important; width: 100% !important; max-width: 100% !important; height: auto; }
  body.product-technology-v2[data-product-workspace="cost"] #productModal .modal-footer > div { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; width: 100% !important; max-width: 100% !important; min-width: 0; gap: 8px !important; }
  body.product-technology-v2[data-product-workspace="cost"] #productModal .modal-footer .button { width: auto !important; max-width: 100% !important; min-width: 0 !important; font-size: 14px !important; white-space: normal !important; }
}
