/* Factory-only analysis workspace. */
html.factory-standalone .fi-workbench { color: #d8e7ec; font-family: "DM Sans", sans-serif; }
html.factory-standalone .fi-heading { padding: 10px 4px 8px; }
html.factory-standalone .fi-heading h3 { margin: 4px 0; font: 750 20px Manrope, sans-serif; letter-spacing: -.025em; }
html.factory-standalone .fi-heading p { margin: 0; color: #8097a4; font-size: 11px; line-height: 1.4; }
html.factory-standalone .fi-sections { display: flex; gap: 5px; overflow-x: auto; padding: 5px 1px 12px; scrollbar-width: none; }
html.factory-standalone .fi-sections::-webkit-scrollbar { display: none; }
html.factory-standalone .fi-sections button,
html.factory-standalone .fi-source-switch button,
html.factory-standalone .fi-filter-row button { flex: 0 0 auto; min-height: 35px; padding: 0 11px; border: 1px solid rgba(120, 153, 169, .18); border-radius: 999px; background: rgba(7, 16, 26, .75); color: #8ca2ac; font: 750 9px Manrope, sans-serif; letter-spacing: .04em; cursor: pointer; }
html.factory-standalone .fi-sections button.active,
html.factory-standalone .fi-source-switch button.active,
html.factory-standalone .fi-filter-row button.active { border-color: rgba(53, 214, 224, .48); background: rgba(18, 68, 78, .8); color: #5be8ee; }
html.factory-standalone .fi-source-switch button:disabled { opacity: .45; cursor: not-allowed; }
html.factory-standalone .fi-source-switch,
html.factory-standalone .fi-filter-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
html.factory-standalone .fi-explain { margin: 4px 0 10px; padding: 11px 12px; border: 1px solid rgba(225, 196, 111, .22); border-radius: 13px; background: rgba(63, 44, 16, .21); color: #b8ac8f; font-size: 10px; line-height: 1.5; }
html.factory-standalone .fi-explain b { color: #e5c967; }
html.factory-standalone .fi-card { margin: 0 0 10px; padding: 13px; border: 1px solid rgba(113, 149, 165, .19); border-radius: 16px; background: linear-gradient(145deg, rgba(10, 21, 33, .92), rgba(7, 14, 25, .94)); box-shadow: inset 0 1px rgba(255,255,255,.025); }
html.factory-standalone .fi-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 11px; color: #52d9e4; font: 800 9px Manrope, sans-serif; letter-spacing: .1em; }
html.factory-standalone .fi-card-top b { color: #e4c967; font-size: 9px; white-space: nowrap; }
html.factory-standalone .fi-card h4 { margin: 3px 0 6px; font: 750 15px Manrope, sans-serif; }
html.factory-standalone .fi-card p { margin: 4px 0 12px; color: #8ea1ad; font-size: 10px; line-height: 1.45; }
html.factory-standalone .fi-card code { color: #68e4e7; }
html.factory-standalone .fi-replay-card>strong { display: block; color: #eef7fa; font: 750 14px Manrope, sans-serif; line-height: 1.35; }
html.factory-standalone .fi-replay-card>small { display: block; margin: 5px 0 14px; color: #8fa3ad; font-size: 10px; }
html.factory-standalone .fi-range { width: 100%; margin: 0 0 10px; accent-color: #3bdce6; cursor: pointer; }
html.factory-standalone .fi-replay-controls { display: flex; gap: 6px; }
html.factory-standalone .fi-replay-controls button,
html.factory-standalone .fi-primary,
html.factory-standalone .fi-secondary { min-height: 38px; padding: 7px 11px; border: 1px solid rgba(66, 215, 225, .25); border-radius: 11px; background: rgba(17, 58, 69, .75); color: #61e6ee; font: 750 10px Manrope, sans-serif; cursor: pointer; }
html.factory-standalone .fi-replay-controls button { flex: 1; }
html.factory-standalone .fi-replay-controls button:disabled { opacity: .4; cursor: not-allowed; }
html.factory-standalone .fi-primary { width: 100%; margin-top: 8px; background: rgba(22, 80, 91, .8); }
html.factory-standalone .fi-secondary { width: 100%; margin-top: 7px; background: rgba(12, 25, 37, .8); color: #acc5ce; }
html.factory-standalone .fi-replay-card p { margin: 10px 0 0; }
html.factory-standalone .fi-event-list { display: grid; gap: 5px; }
html.factory-standalone .fi-event { display: grid; grid-template-columns: 25px minmax(0,1fr) 8px; align-items: center; gap: 8px; min-width: 0; padding: 9px 8px; border: 1px solid rgba(113, 149, 165, .13); border-radius: 11px; background: rgba(6, 14, 23, .7); color: #afc2ca; text-align: left; cursor: pointer; }
html.factory-standalone .fi-event.active { border-color: rgba(59, 220, 230, .5); background: rgba(19, 65, 77, .65); }
html.factory-standalone .fi-event:not(.seen) { opacity: .6; }
html.factory-standalone .fi-event b,
html.factory-standalone .fi-event small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.factory-standalone .fi-event b { font-size: 10px; }
html.factory-standalone .fi-event small { margin-top: 3px; color: #77909c; font-size: 9px; }
html.factory-standalone .fi-event-index { color: #58d9e5; font: 800 10px Manrope, sans-serif; }
html.factory-standalone .fi-severity { width: 7px; height: 7px; border-radius: 50%; background: #4fcaad; }
html.factory-standalone .fi-severity.high { background: #f0b35c; }
html.factory-standalone .fi-severity.critical { background: #ff6668; }
html.factory-standalone .fi-severity.medium { background: #e8ca6e; }
html.factory-standalone .fi-process { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 55px; margin-top: 5px; padding: 8px 10px; border: 1px solid rgba(113,149,165,.13); border-radius: 11px; background: rgba(7,15,25,.7); color: #d5e4e9; text-align: left; cursor: pointer; }
html.factory-standalone .fi-process.active { border-color: rgba(59,220,230,.45); background: rgba(19,64,76,.5); }
html.factory-standalone .fi-process span { min-width: 0; }
html.factory-standalone .fi-process b,
html.factory-standalone .fi-process small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.factory-standalone .fi-process b { font-size: 10px; }
html.factory-standalone .fi-process small { margin-top: 4px; color: #718a96; font-size: 9px; }
html.factory-standalone .fi-impact { flex: 0 0 auto; color: #4fcaad; font-size: 9px; font-style: normal; }
html.factory-standalone .fi-impact.high { color: #f0b35c; }
html.factory-standalone .fi-impact.critical { color: #ff7672; }
html.factory-standalone .fi-pairs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin: 10px 0 4px; }
html.factory-standalone .fi-pairs div { min-width: 0; padding: 8px; border: 1px solid rgba(113,149,165,.13); border-radius: 9px; }
html.factory-standalone .fi-pairs dt { color: #728b98; font-size: 8px; }
html.factory-standalone .fi-pairs dd { margin: 4px 0 0; overflow-wrap: anywhere; color: #d8e6eb; font-size: 10px; }
html.factory-standalone .fi-change { padding: 10px 0; border-top: 1px solid rgba(113,149,165,.13); }
html.factory-standalone .fi-change>div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
html.factory-standalone .fi-change b { font-size: 11px; }
html.factory-standalone .fi-change>small { display: block; margin: 5px 0 8px; color: #758c98; font-size: 9px; }
html.factory-standalone .fi-status { padding: 4px 6px; border-radius: 8px; font-size: 8px; white-space: nowrap; }
html.factory-standalone .fi-status.alert { background: rgba(135,59,46,.25); color: #ff8e7e; }
html.factory-standalone .fi-status.approved { background: rgba(38,102,82,.25); color: #71d5ae; }
html.factory-standalone .fi-diff { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 5px; color: #78909b; font-size: 9px; }
html.factory-standalone .fi-diff span,
html.factory-standalone .fi-diff strong { min-width: 0; overflow-wrap: anywhere; }
html.factory-standalone .fi-diff strong { color: #e4c967; }
html.factory-standalone .fi-change>button { margin-top: 8px; border: 0; background: transparent; color: #60dce8; font: 700 9px Manrope, sans-serif; cursor: pointer; }
html.factory-standalone .fi-case-list { display: grid; gap: 5px; margin-bottom: 9px; }
html.factory-standalone .fi-case-list button { padding: 9px; border: 1px solid rgba(113,149,165,.15); border-radius: 10px; background: rgba(7,15,25,.8); color: #d3e1e7; text-align: left; cursor: pointer; }
html.factory-standalone .fi-case-list button.active { border-color: rgba(59,220,230,.46); }
html.factory-standalone .fi-case-list b,
html.factory-standalone .fi-case-list small { display: block; }
html.factory-standalone .fi-case-list b { color: #59dce7; font-size: 9px; }
html.factory-standalone .fi-case-list small { margin-top: 3px; overflow: hidden; color: #9db3bd; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
html.factory-standalone .fi-field { display: grid; gap: 5px; margin: 9px 0; color: #8da5af; font-size: 9px; }
html.factory-standalone .fi-field select,
html.factory-standalone .fi-field textarea { box-sizing: border-box; width: 100%; min-height: 38px; padding: 8px 9px; border: 1px solid rgba(113,149,165,.23); border-radius: 10px; background: #081522; color: #dfebee; font: 600 10px "DM Sans",sans-serif; }
html.factory-standalone .fi-field textarea { min-height: 70px; resize: vertical; }
html.factory-standalone .fi-two-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
html.factory-standalone .fi-evidence { display: grid; gap: 5px; margin: 12px 0; }
html.factory-standalone .fi-evidence button { display: grid; gap: 3px; padding: 8px; border: 1px solid rgba(113,149,165,.15); border-radius: 9px; background: rgba(6,14,23,.8); color: #cddfe5; text-align: left; cursor: pointer; }
html.factory-standalone .fi-evidence b { color: #53dbe6; font-size: 9px; }
html.factory-standalone .fi-evidence span,
html.factory-standalone .fi-evidence small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
html.factory-standalone .fi-evidence small { color: #758c99; }
html.factory-standalone .fi-timeline { margin: 13px 0; border-left: 1px solid rgba(59,220,230,.36); }
html.factory-standalone .fi-timeline div { padding: 0 0 10px 12px; }
html.factory-standalone .fi-timeline time { color: #57d9e4; font-size: 8px; }
html.factory-standalone .fi-timeline p { margin: 3px 0 0; overflow-wrap: anywhere; }
html.factory-standalone .fi-technique { padding: 10px 0; border-top: 1px solid rgba(113,149,165,.16); }
html.factory-standalone .fi-technique>div { display: flex; align-items: center; gap: 8px; }
html.factory-standalone .fi-technique a { color: #53dce6; font: 800 10px Manrope,sans-serif; }
html.factory-standalone .fi-technique b { font-size: 10px; }
html.factory-standalone .fi-technique small { display: block; margin-top: 5px; color: #8ba2ad; font-size: 9px; }
html.factory-standalone .fi-technique p { margin: 5px 0; font-size: 9px; }
html.factory-standalone .fi-technique p strong { color: #bdd5db; }
html.factory-standalone .fi-footnote { padding-top: 9px; border-top: 1px solid rgba(113,149,165,.16); }
html.factory-standalone .fi-source { display: flex; align-items: center; gap: 9px; min-height: 45px; border-top: 1px solid rgba(113,149,165,.15); }
html.factory-standalone .fi-source i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #61717b; }
html.factory-standalone .fi-source i.on { background: #54d7b6; box-shadow: 0 0 9px rgba(84,215,182,.6); }
html.factory-standalone .fi-source b,
html.factory-standalone .fi-source small { display: block; }
html.factory-standalone .fi-source b { font-size: 10px; }
html.factory-standalone .fi-source small { margin-top: 3px; color: #8298a4; font-size: 9px; }
html.factory-standalone .fi-file { display: grid; gap: 7px; margin: 10px 0; color: #9cb3bd; font-size: 10px; }
html.factory-standalone .fi-file input { max-width: 100%; color: #c9d9df; font-size: 9px; }
html.factory-standalone .fi-message { margin: 8px 0; padding: 9px; border-radius: 9px; background: rgba(37,96,76,.22); color: #90e3ba; font-size: 10px; }
html.factory-standalone .fi-message.error { background: rgba(124,45,47,.24); color: #ff9e94; }
html.factory-standalone .fi-empty { color: #718b98; font-size: 10px; }
html.factory-standalone .fi-workbench button:hover:not(:disabled) { filter: brightness(1.18); }
html.factory-standalone .fi-workbench :is(button, input, select, textarea, a):focus-visible { outline: 2px solid #45dce6; outline-offset: 2px; }
html.factory-standalone body.light-theme .fi-workbench { color: #1f3d49; }
html.factory-standalone body.light-theme .fi-heading p,
html.factory-standalone body.light-theme .fi-card p { color: #4c6874; }
html.factory-standalone body.light-theme .fi-card,
html.factory-standalone body.light-theme .fi-event,
html.factory-standalone body.light-theme .fi-process,
html.factory-standalone body.light-theme .fi-case-list button,
html.factory-standalone body.light-theme .fi-evidence button { background: #f6fafb; border-color: rgba(36,91,105,.2); color: #25434f; }
html.factory-standalone body.light-theme .fi-explain { background: #fff7e7; color: #755e33; }
html.factory-standalone body.light-theme .fi-replay-card>strong,
html.factory-standalone body.light-theme .fi-process b,
html.factory-standalone body.light-theme .fi-pairs dd,
html.factory-standalone body.light-theme .fi-source b { color: #1c3e4a; }
html.factory-standalone body.light-theme .fi-field select,
html.factory-standalone body.light-theme .fi-field textarea { background: #fff; color: #1e3d49; }
@media (max-width: 760px) {
  html.factory-standalone .fi-heading h3 { font-size: 18px; }
  html.factory-standalone .fi-sections button { min-height: 39px; font-size: 10px; }
  html.factory-standalone .fi-card { padding: 12px; }
  html.factory-standalone .fi-replay-controls button { min-height: 42px; }
  html.factory-standalone .fi-process { min-height: 59px; }
}
