/* FlowForge app styles, scoped under .ff (ported from the MVP prototype). */
.ff{--bg:#f6f7fb;--panel:#fff;--ink:#172033;--muted:#6b7280;--line:#e6e9f0;--blue:#5b5ce2;--blue2:#ececff;--green:#16865b;--red:#d94b55;--amber:#b7791f;--shadow:0 8px 28px #1720330a;background:var(--bg);color:var(--ink);font:14px/1.45 ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;min-height:100vh;width:100%}
.ff *{box-sizing:border-box}
.ff button,.ff input,.ff select,.ff textarea{font:inherit;color:inherit}
.ff button{cursor:pointer;border:0;border-radius:9px;padding:10px 13px;font-weight:650;transition:.15s}
.ff button:hover:not(:disabled){filter:brightness(.97);transform:translateY(-1px)}
.ff button:disabled{opacity:.55;cursor:not-allowed}
.ff a{color:var(--blue)}
.ff .primary{background:var(--blue);color:#fff}
.ff .secondary{background:#f1f2f8;color:var(--ink);border:1px solid var(--line)}
.ff .danger{color:var(--red);background:#fff0f1}
.ff .linkbtn{background:none;padding:0;color:var(--blue);font-weight:650}
.ff .app{display:flex;min-height:100vh}
.ff .sidebar{width:238px;background:#fff;border-right:1px solid var(--line);padding:22px 14px;display:flex;flex-direction:column;gap:22px;flex-shrink:0;position:sticky;top:0;height:100vh}
.ff .brand{display:flex;align-items:center;gap:10px;padding:0 10px;font-size:18px;font-weight:850;letter-spacing:-.5px}
.ff .logo{height:34px;width:34px;border-radius:11px;background:linear-gradient(135deg,#7374ff,#4546c7);color:#fff;display:grid;place-items:center;font-size:18px}
.ff .avatar{width:31px;height:31px;border-radius:9px;background:#e5e7ff;color:#494ac2;display:grid;place-items:center;font-weight:800;flex-shrink:0}
.ff .small{font-size:12px;color:var(--muted)}
.ff .navlabel{font-size:10px;text-transform:uppercase;letter-spacing:1.1px;color:#9aa0ad;padding:0 12px;font-weight:800;margin-bottom:6px}
.ff .nav{display:flex;flex-direction:column;gap:4px}
.ff .nav button{background:transparent;color:#596174;text-align:left;font-weight:600;padding:11px 12px;display:flex;gap:12px;align-items:center}
.ff .nav button.active{background:var(--blue2);color:#4849c9}
.ff .nav .ico{width:18px;text-align:center;font-size:16px}
.ff .sidebarbottom{margin-top:auto;border:1px solid var(--line);border-radius:12px;padding:13px}
.ff .main{flex:1;min-width:0}
.ff .topbar{height:70px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 30px;gap:12px}
.ff .crumb{color:var(--muted)}
.ff .topright{display:flex;gap:10px;align-items:center}
.ff .content{padding:30px;max-width:1500px;margin:auto}
.ff .pagehead{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:24px}
.ff .pagehead h1{margin:0 0 5px;font-size:27px;letter-spacing:-.8px;font-weight:800}
.ff .pagehead p{margin:0;color:var(--muted)}
.ff .actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.ff .stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:24px}
.ff .card{background:var(--panel);border:1px solid var(--line);border-radius:15px;box-shadow:var(--shadow)}
.ff .stat{padding:19px}
.ff .statlabel{color:var(--muted);font-size:12px;font-weight:650}
.ff .statnum{font-size:28px;font-weight:800;letter-spacing:-1px;margin:8px 0 5px}
.ff .trend{font-size:12px;color:var(--green)}
.ff .sectionhead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;flex-wrap:wrap}
.ff .sectionhead h2{margin:0;font-size:17px;font-weight:750}
.ff .tablewrap{overflow:auto}
.ff .table{width:100%;border-collapse:collapse}
.ff .table th{text-align:left;color:#8a91a0;font-size:11px;text-transform:uppercase;letter-spacing:.7px;background:#fbfcfe;font-weight:700}
.ff .table th,.ff .table td{padding:14px 18px;border-bottom:1px solid var(--line);vertical-align:middle}
.ff .table tr:last-child td{border-bottom:0}
.ff .wf-name{font-weight:750;display:flex;align-items:center;gap:10px}
.ff .appicon{width:34px;height:34px;border:1px solid var(--line);border-radius:10px;display:grid;place-items:center;background:#fff;font-size:15px;font-weight:800;flex-shrink:0}
.ff .pill{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:750;background:#f1f2f6;color:#626a7b;white-space:nowrap}
.ff .pill.on{background:#e6f7ee;color:#17734d}
.ff .pill.failed{background:#fff0f0;color:#c23e48}
.ff .pill.draft{background:#fff6e6;color:#9b681b}
.ff .rowbtn{padding:7px 9px;background:#f5f6fa;border:1px solid var(--line);font-size:12px}
.ff .two-col{display:grid;grid-template-columns:1.5fr 1fr;gap:18px}
.ff .two-col>*,.ff .builderwrap>*{min-width:0}
.ff .pad{padding:20px}
.ff .activityrow{display:flex;gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}
.ff .activityrow:last-child{border-bottom:0}
.ff .statusdot{height:9px;width:9px;border-radius:50%;background:var(--green);margin-top:6px;flex-shrink:0}
.ff .statusdot.bad{background:var(--red)}
.ff .statusdot.warn{background:var(--amber)}
.ff .empty{text-align:center;padding:42px 20px;color:var(--muted)}
.ff .search{padding:10px 12px;border:1px solid var(--line);border-radius:9px;outline:none;background:#fff;min-width:210px}
.ff .search:focus,.ff input:focus,.ff select:focus,.ff textarea:focus{border-color:#999aff;box-shadow:0 0 0 3px #5b5ce21a;outline:none}
.ff .builderwrap{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:16px;align-items:start}
.ff .canvas{background-color:#fbfcff;background-image:radial-gradient(#dfe3ee 1px,transparent 1px);background-size:20px 20px;min-height:520px;padding:28px;border:1px solid var(--line);border-radius:15px}
.ff .canvashead{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;gap:10px;flex-wrap:wrap}
.ff .flowline{display:flex;flex-direction:column;align-items:center;max-width:460px;margin:0 auto}
.ff .node{background:#fff;border:1px solid #dfe3ec;border-radius:13px;padding:14px;width:100%;box-shadow:0 5px 16px #1a25400a;cursor:pointer;text-align:left}
.ff .node.selected{border:2px solid var(--blue);padding:13px}
.ff .node.err{border-color:#f2b8bd}
.ff .node-top{display:flex;align-items:center;gap:10px}
.ff .node h3{font-size:13px;margin:0 0 3px;font-weight:750}
.ff .node p{font-size:11px;color:var(--muted);margin:0}
.ff .nodebadge{margin-left:auto;font-size:10px;color:#777;font-weight:700}
.ff .connector{height:30px;width:2px;background:#cbd0df;position:relative}
.ff .connector:after{content:"";position:absolute;bottom:-1px;left:-4px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid #cbd0df}
.ff .addnode{border:1px dashed #aeb3ca;background:#fff;color:#6667d9;border-radius:9px;padding:8px 12px;font-size:12px;margin:10px 0}
.ff .sidepanel{padding:18px;position:sticky;top:15px;max-height:calc(100vh - 30px);overflow:auto}
.ff .sidepanel h3{margin:0 0 5px;font-weight:750}
.ff .field{display:flex;flex-direction:column;gap:6px;margin:14px 0}
.ff .field label{font-size:12px;font-weight:700;color:#555d70}
.ff .field input,.ff .field select,.ff .field textarea{width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink)}
.ff .field textarea{min-height:80px;resize:vertical;font-family:inherit}
.ff .mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}
.ff .helper{font-size:11px;color:var(--muted)}
.ff .divider{height:1px;background:var(--line);margin:18px 0}
.ff .integrationgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
.ff .integration{padding:18px;display:flex;flex-direction:column;gap:12px}
.ff .integrationtop{display:flex;align-items:center;gap:12px}
.ff .integration h3{margin:0;font-size:14px;font-weight:750}
.ff .integration p{margin:0;color:var(--muted);font-size:12px}
.ff .integration .actions{margin-top:auto}
.ff .acct{display:flex;align-items:center;gap:8px;font-size:12px;background:#f7f8fb;border:1px solid var(--line);border-radius:8px;padding:6px 8px}
.ff .acct span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ff .chips{display:flex;gap:6px;flex-wrap:wrap}
.ff .chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 11px;font-size:12px;font-weight:650}
.ff .chip.active{background:var(--blue2);border-color:#c9caff;color:#4849c9}
.ff .varchip{border:1px solid #d9dbff;background:#f4f4ff;color:#4849c9;border-radius:7px;padding:3px 7px;font-size:11px;font-family:ui-monospace,Menlo,monospace;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ff .formrow{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ff .modalback{position:fixed;inset:0;background:#10172c66;display:flex;align-items:center;justify-content:center;padding:18px;z-index:50}
.ff .modal{background:#fff;border-radius:16px;padding:24px;width:min(600px,100%);max-height:calc(100vh - 36px);overflow:auto;box-shadow:0 20px 70px #0003}
.ff .modal h2{margin:0 0 5px;font-size:20px;font-weight:800}
.ff .modal p{color:var(--muted);margin:0 0 12px}
.ff .modalfoot{display:flex;justify-content:flex-end;gap:8px;margin-top:20px;flex-wrap:wrap}
.ff .toast{position:fixed;bottom:22px;right:22px;background:#172033;color:#fff;padding:12px 16px;border-radius:10px;box-shadow:var(--shadow);z-index:60;max-width:min(420px,calc(100vw - 44px))}
.ff .toast.bad{background:#a12f39}
.ff pre.json{background:#0f172a;color:#dbe4ff;border-radius:10px;padding:12px;overflow:auto;max-height:280px;font-size:12px;margin:6px 0 0;white-space:pre-wrap;word-break:break-word}
.ff .copyrow{display:flex;gap:6px}
.ff .copyrow input{flex:1;min-width:0}
.ff .notice{border:1px solid #f1d9a6;background:#fffaf0;color:#7a5410;border-radius:10px;padding:12px 14px;font-size:13px}
.ff .notice.info{border-color:#d9dbff;background:#f6f6ff;color:#3e3fa8}
.ff .steplog{border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin-top:8px}
.ff .login{min-height:100vh;display:grid;place-items:center;padding:20px}
.ff .mobilemenu{display:none}
.ff .toggle{display:inline-flex;align-items:center;gap:8px;font-weight:650;cursor:pointer;user-select:none}
.ff .toggle .track{width:36px;height:20px;border-radius:99px;background:#d4d7e2;position:relative;transition:.15s}
.ff .toggle .track:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:.15s;box-shadow:0 1px 3px #0003}
.ff .toggle.on .track{background:var(--green)}
.ff .toggle.on .track:after{left:18px}
@media(max-width:1100px){.ff .sidebar{width:205px}.ff .stats{grid-template-columns:repeat(2,1fr)}.ff .integrationgrid{grid-template-columns:repeat(2,1fr)}.ff .builderwrap{grid-template-columns:1fr}.ff .sidepanel{position:static;max-height:none}.ff .two-col{grid-template-columns:1fr}}
@media(max-width:720px){.ff .sidebar{display:none}.ff .sidebar.open{display:flex;position:fixed;z-index:40;box-shadow:0 10px 30px #0002}.ff .topbar{height:60px;padding:0 15px}.ff .mobilemenu{display:inline-block}.ff .content{padding:19px 14px}.ff .pagehead{flex-direction:column}.ff .pagehead h1{font-size:24px}.ff .stats{gap:9px}.ff .stat{padding:13px}.ff .statnum{font-size:23px}.ff .integrationgrid{grid-template-columns:1fr}.ff .table{min-width:680px}.ff .search{min-width:0;width:100%}.ff .formrow{grid-template-columns:1fr}.ff .canvas{padding:14px}.ff .topright .hide-mobile{display:none}}
html,body{margin:0;background:#f6f7fb}
.ff code{background:#f1f2f8;border-radius:5px;padding:1px 5px;font-size:12px}
