.fc-editor { max-width: 920px; margin: 0 auto; padding: 20px 24px 100px; color: #24272c; background: #fff; }
.fc-editor *, .ff-dialog *, .ff-suggestions * { box-sizing: border-box; letter-spacing: 0; }
.fc-heading, .fc-inline, .fc-footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fc-heading { justify-content: space-between; margin: 16px 0; }
.fc-heading h1 { flex: 1; margin: 0; font-size: 23px; line-height: 1.3; }
.fc-editor h2 { font-size: 17px; margin: 0 0 16px; }
.fc-heading h2 { margin: 0; }
.fc-tabs { display: flex; gap: 20px; flex-wrap: wrap; border-bottom: 1px solid #e2e4e7; padding: 8px 0 16px; }
.fc-tabs a { color: #555b65; font-size: 14px; text-decoration: none; }
.fc-tabs a[aria-current] { color: #087d65; font-weight: 700; }
.fc-section { padding: 22px 0; border-bottom: 1px solid #e2e4e7; }
.fc-section summary { font-weight: 600; cursor: pointer; font-size: 15px; }
.fc-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.fc-fields label { margin-top: 6px; font-size: 14px; font-weight: 600; }
.fc-editor input:not([type=checkbox]):not([type=hidden]), .fc-editor select, .fc-editor textarea, .ff-dialog select, .ff-dialog textarea, .ff-dialog input[type=number] { width: 100%; min-width: 0; max-width: 100%; border: 1px solid #bfc5cc; border-radius: 6px; background: #fff; color: #24272c; padding: 10px 12px; min-height: 42px; font-size: 15px; }
.fc-editor input:focus, .fc-editor select:focus, .fc-editor textarea:focus, .ff-dialog select:focus { outline: 2px solid #0d9176; outline-offset: 2px; }
.fc-editor input[type=number] { max-width: 220px; }
.fc-editor input[type=checkbox], .ff-dialog input[type=checkbox] { width: 18px; height: 18px; accent-color: #087d65; flex-shrink: 0; }
.fc-inline > select { flex: 1; width: auto; }
.fc-icon, .fc-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border: 1px solid #cbd1d6; border-radius: 6px; background: #fff; color: #30373f; padding: 10px 14px; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: 600; }
.fc-icon { width: 42px; height: 42px; padding: 0; flex: 0 0 42px; }
.fc-button.primary { background: #087d65; border-color: #087d65; color: #fff; }
.fc-button.danger { color: #b42318; border-color: #efb4ae; background: #fff5f3; }
.fc-button.danger:hover { border-color: #d92d20; background: #fee4e2; }
.fc-button:disabled, .fc-icon:disabled { opacity: .5; cursor: default; }
.fc-photo { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.fc-photo img { width: 130px; height: 100px; object-fit: contain; border: 1px solid #e2e4e7; border-radius: 6px; }
.fc-photo input { flex: 1; min-width: 200px !important; }
.fc-category-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 0; }
.fc-category-tag { display: flex; align-items: center; gap: 10px; background: #edf8f4; padding: 6px 10px; color: #076950; border-radius: 6px; font-size: 14px; overflow-wrap: anywhere; }
.fc-category-tag button { background: transparent; border: 0; cursor: pointer; padding: 8px; color: inherit; }
.fc-slot { border: 0; padding: 20px 0; margin: 0; min-width: 0; border-bottom: 1px solid #e2e4e7; }
.fc-slot legend { padding: 0; font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.fc-product-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; max-height: 320px; overflow-y: auto; margin: 14px 0; }
.fc-product-choice { display: flex; align-items: center; gap: 10px; min-height: 58px; border-bottom: 1px solid #f0f1f2; font-size: 14px; cursor: pointer; padding: 6px 0; }
.fc-product-choice img { width: 42px; height: 42px; object-fit: contain; border-radius: 4px; flex: 0 0 42px; }
.fc-product-choice span { min-width: 0; overflow-wrap: anywhere; }
.fc-product-choice small { display: block; color: #68707a; font-size: 12px; margin-top: 3px; }
.fc-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.fc-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0 6px; }
.fc-status-grid .fc-check { min-height: 42px; border: 1px solid #d7dde2; border-radius: 6px; padding: 10px 12px; background: #f9fafb; }
.fc-recipe-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 100px 42px; align-items: end; gap: 8px; margin-bottom: 12px; }
.fc-recipe-row label { display: grid; gap: 6px; font-size: 12px; color: #555b65; min-width: 0; }
.fc-muted { color: #68707a; font-size: 14px; }
.fc-error { border-left: 3px solid #d1414d; background: #fff2f3; padding: 12px; color: #aa2133; font-size: 14px; overflow-wrap: anywhere; }
.fc-editor [hidden], .ff-dialog [hidden], .ff-suggestions[hidden] { display: none !important; }
.fc-footer { justify-content: space-between; padding: 20px 0; }
.fc-editor details[open] > .fc-fields { padding-top: 16px; }
.fc-catalog { max-width: 1160px; min-height: 70vh; }
.fc-catalog-items { display: grid; gap: 12px; }
.fc-sale-item { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid #e2e4e7; min-width: 0; }
.fc-sale-item img { width: 90px; height: 82px; object-fit: contain; border-radius: 6px; flex: 0 0 90px; }
.fc-sale-item h3 { font-size: 16px; margin: 0 0 6px; overflow-wrap: anywhere; }
.fc-sale-item p { font-size: 13px; margin: 5px 0; color: #626b75; overflow-wrap: anywhere; }
.fc-sale-copy { flex: 1; min-width: 0; }
.fc-sale-copy > strong { font-size: 15px; color: #087d65; }
.fc-row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.fc-row-actions form { margin: 0; }
.fc-category-open { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.fc-category-open > div { flex: 1; min-width: 0; }
.fc-category-open span { display: block; font-size: 13px; color: #626b75; }
.fc-unassigned { display: flex; justify-content: space-between; padding: 10px 0; font-size: 14px; color: #a54031; }
.fc-notice { padding: 12px; background: #edf8f4; color: #076950; font-size: 14px; }
.fc-formula-identity { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 16px; }
.fc-formula-identity > label { display: grid; gap: 10px; }
.fc-context { font-size: 14px; color: #087d65; margin: 0 0 8px; }
.ff-dialog { width: min(870px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 1px solid #d8e0ea; border-radius: 8px; color: #101828; background: #fff; font-family: Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; box-shadow: 0 24px 70px rgba(15,23,42,.32); }
.ff-dialog { margin: auto; }
.ff-dialog::backdrop { background: rgba(15,23,42,.62); backdrop-filter: blur(2px); }
.ff-form { display: flex; flex-direction: column; max-height: calc(100dvh - 30px); }
.ff-head { display: flex; align-items: flex-start; gap: 16px; padding: 24px 28px 20px; border-bottom: 1px solid #e2e8f0; flex-shrink: 0; }
.ff-head > div { flex: 1; min-width: 0; }
.ff-head-copy { flex: 1; min-width: 0; }
.ff-head h2 { font-size: 28px; margin: 0 0 8px; line-height: 1.15; font-weight: 700; overflow-wrap: anywhere; }
.ff-head strong { color: #087d65; font-size: 19px; font-weight: 900; }
.ff-close { width: 48px; height: 48px; flex-basis: 48px; border-radius: 7px; background: #fff; font-size: 28px; font-weight: 400; color: #25374e; }
.ff-body { overflow-y: auto; padding: 0 28px 18px; }
.ff-count { padding: 12px 0 0; color: #5b667a; font-size: 14px; margin: 0; }
.ff-slot { border-top: 1px solid #e2e8f0; padding: 18px 0 20px; }
.ff-slot:first-child { border-top: 0; }
.ff-slot-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.ff-slot-label { display: flex; align-items: center; gap: 14px; min-width: 0; cursor: pointer; overflow-wrap: anywhere; }
.ff-category-check { position: absolute; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.ff-step { width: 37px; height: 37px; flex: 0 0 37px; border-radius: 50%; border: 1px solid #cfd8e3; background: #f3f6fa; color: #5c6d82; display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.ff-slot.is-selected .ff-step { background: #087d65; border-color: #087d65; color: #fff; }
.ff-slot-label:has(input:focus-visible) .ff-step { outline: 3px solid #72b7ff; outline-offset: 3px; }
.ff-slot-copy { display: flex; align-items: baseline; gap: 14px; min-width: 0; flex-wrap: wrap; }
.ff-slot-title { color: #152239; font-size: 21px; font-weight: 700; line-height: 1.25; }
.ff-slot-label small { color: #6a7b95; font-size: 13px; font-weight: 400; }
.ff-slot.is-disabled .ff-step { background: #cbd5e1; }
.ff-slot.is-disabled .ff-slot-title { color: #667085; }
.ff-more { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; color: #0866e8; font-weight: 750; font-size: 14px; }
.ff-slot fieldset { border: 0; min-width: 0; padding: 0; margin: 0; }
.ff-pick { margin-top: 12px; }
.ff-pick + .ff-pick { border-top: 1px dashed #d8e0ea; padding-top: 14px; margin-top: 16px; }
.ff-pick-title { color: #334155; font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.ff-search { position: relative; display: block; margin-bottom: 12px; }
.ff-search i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #344054; font-size: 16px; pointer-events: none; }
.ff-search input { width: 100%; min-height: 46px; border: 1px solid #cfd8e3; border-radius: 7px; padding: 11px 14px 11px 44px; font-size: 15px; color: #101828; outline: none; background: #fff; }
.ff-search input:focus { border-color: #087d65; box-shadow: 0 0 0 3px rgba(8,125,101,.12); }
.ff-native-select { position: absolute; left: -9999px; width: 1px !important; height: 1px !important; opacity: 0; }
.ff-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ff-product-choice { min-width: 0; min-height: 72px; border: 1px solid #d8e0ea; border-radius: 7px; background: #fff; color: #152239; display: flex; align-items: center; gap: 13px; padding: 7px 40px 7px 8px; text-align: left; position: relative; font-weight: 600; font-size: 14px; transition: border-color .12s, background .12s; }
.ff-product-choice img, .ff-product-image, .ff-thumb-empty { width: 82px; height: 55px; flex: 0 0 82px; border-radius: 5px; object-fit: cover; background: #f1f5f9 center / cover no-repeat; display: grid; place-items: center; color: #667085; }
.ff-product-name { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.ff-product-check { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: #087d65; color: #fff; display: none; place-items: center; font-size: 15px; }
.ff-product-choice.is-selected { border-color: #087d65; background: #edf8f5; box-shadow: inset 0 0 0 1px #087d65; }
.ff-product-choice:not(:disabled):hover { border-color: #087d65; }
.ff-product-choice.is-selected .ff-product-check { display: grid; }
.ff-product-choice:disabled { opacity: .5; cursor: default; }
.ff-product-choice.is-selected:disabled { opacity: 1; }
.ff-products-compact { grid-template-columns: repeat(4,minmax(0,1fr)); }
.ff-products-compact .ff-product-choice { min-height: 90px; padding: 8px 27px 8px 8px; gap: 8px; font-size: 12px; }
.ff-products-compact .ff-product-choice img, .ff-products-compact .ff-product-image, .ff-products-compact .ff-thumb-empty { width: 50px; height: 64px; flex-basis: 50px; }
.ff-products-compact .ff-product-check { width: 21px; height: 21px; right: 5px; font-size: 12px; }
.ff-empty-products { grid-column: 1 / -1; color: #667085; font-size: 14px; padding: 14px 0; text-align: center; }
.ff-preview { margin: 8px 0 0; font-size: 12px; color: #667085; line-height: 1.35; overflow-wrap: anywhere; }
.ff-preview:empty { display: none; }
.ff-option { display: grid; gap: 8px; margin: 12px 0 !important; font-size: 13px; }
.ff-option legend { font-weight: 800; margin-bottom: 7px; }
.ff-note { display: grid; gap: 7px; margin-top: 2px; font-size: 14px; font-weight: 700; }
.ff-note textarea { min-height: 66px; resize: vertical; }
.ff-foot { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding: 14px 28px; border-top: 1px solid #e2e8f0; flex-shrink: 0; background: #fff; }
.ff-total span { display: block; color: #667085; font-size: 14px; font-weight: 650; }
.ff-total strong { display: block; font-size: 28px; line-height: 1; margin-top: 4px; color: #101828; }
.ff-foot-actions { display: flex; gap: 12px; align-items: center; }
.ff-foot-actions .fc-button { min-height: 50px; padding: 12px 24px; border-radius: 7px; font-size: 14px; }
.ff-foot-actions .fc-button.primary { min-width: 154px; }
.fc-button.ghost { background: #f8fafc; color: #101828; }
.ff-suggestions { padding: 10px 14px; background: #f0fdfa; color: #076950; font-size: 13px; border-bottom: 1px solid #bfe7dc; }
.ff-suggestion { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #cfeee5; }
.ff-suggestion:last-child { border-bottom: 0; }
.ff-suggestion > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ff-suggestion strong, .ff-suggestion span { display: block; }
.ff-suggestion span { font-size: 12px; margin-top: 4px; }
.ff-suggestion button { flex-shrink: 0; }
@media(max-width:600px) {
    .fc-sale-item { flex-wrap: wrap; gap: 10px; }
    .fc-row-actions { margin-left: auto; }
    .fc-formula-identity { grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; }
    .fc-catalog > .fc-heading > form { width: 100%; }
    .fc-editor { padding: 14px 14px 100px; }
    .fc-heading h1 { font-size: 20px; }
    .fc-tabs { gap: 16px; }
    .fc-product-list { grid-template-columns: minmax(0, 1fr); }
    .fc-recipe-row { grid-template-columns: minmax(0, 1fr) 85px 42px; }
    .fc-recipe-row label:first-child { grid-column: 1 / -1; }
    .fc-photo { gap: 10px; }
    .fc-status-grid { grid-template-columns: minmax(0, 1fr); }
    .ff-dialog { width: min(100% - 20px, 420px); max-height: calc(100dvh - 20px); }
    .ff-form { max-height: calc(100dvh - 22px); }
    .ff-head { padding: 18px 18px 15px; }
    .ff-head h2 { font-size: 22px; }
    .ff-close { width: 44px; height: 44px; flex-basis: 44px; }
    .ff-body { padding: 0 18px 14px; }
    .ff-slot-head { align-items: flex-start; }
    .ff-slot-copy { display: block; }
    .ff-slot-title { display: block; font-size: 20px; }
    .ff-slot-label small { display: block; margin-top: 3px; }
    .ff-more { font-size: 13px; padding-top: 9px; }
    .ff-products { grid-template-columns: minmax(0, 1fr); }
    .ff-products-compact { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .ff-products-compact .ff-product-choice { min-height: 82px; gap: 6px; }
    .ff-products-compact .ff-product-choice img, .ff-products-compact .ff-product-image, .ff-products-compact .ff-thumb-empty { width: 42px; height: 54px; flex-basis: 42px; }
    .ff-product-choice { min-height: 68px; padding-right: 48px; font-size: 14px; }
    .ff-product-choice img, .ff-product-image, .ff-thumb-empty { width: 72px; height: 48px; flex-basis: 72px; }
    .ff-foot { padding: 12px 18px; align-items: center; flex-wrap: wrap; }
    .ff-total strong { font-size: 23px; }
    .ff-foot-actions { flex: 1; justify-content: flex-end; }
    .ff-foot-actions .fc-button { min-height: 42px; padding: 10px 12px; }
    .ff-foot-actions .fc-button.primary { min-width: 0; }
    .ff-slot-title { font-size: 18px; }
    .ff-slot-label { gap: 10px; }
    .ff-step { width: 32px; height: 32px; flex-basis: 32px; }
    .ff-slot-head { flex-wrap: wrap; gap: 8px; }
}
