:root{--bg:#f6f7fb;--panel:#fff;--text:#111827;--muted:#6b7280;--line:#e5e7eb;--brand:#ef6c00;--brand-dark:#c2410c;--dark:#111827;--soft:#fff7ed;--danger:#b45309}*{box-sizing:border-box}body{background:var(--bg);color:var(--text);margin:0;font-family:Inter,Segoe UI,Arial,sans-serif}button{cursor:pointer;border:0;font-family:inherit}.login-page{background:radial-gradient(circle at 0 0,#fff7ed,#f6f7fb 45%);place-items:center;min-height:100vh;padding:24px;display:grid}.login-card{border:1px solid var(--line);background:#ffffffeb;border-radius:28px;width:min(460px,100%);padding:36px;box-shadow:0 18px 55px #1118271f}.brand-mark{background:linear-gradient(135deg, var(--brand), #fb923c);color:#fff;border-radius:18px;place-items:center;width:54px;height:54px;font-size:24px;font-weight:900;display:grid}.brand-mark.small{border-radius:14px;flex:none;width:42px;height:42px;font-size:18px}.eyebrow{text-transform:uppercase;letter-spacing:.12em;color:var(--brand-dark);margin:16px 0 6px;font-size:12px;font-weight:800}h1{letter-spacing:-.04em;margin:0;font-size:clamp(26px,3vw,40px)}h2{margin:0 0 14px;font-size:18px}.muted{color:var(--muted);line-height:1.5}.login-form{gap:10px;margin-top:26px;display:grid}.login-form label{font-size:13px;font-weight:700}input,textarea{border:1px solid var(--line);border-radius:14px;outline:none;width:100%;padding:13px 14px;font-size:15px}textarea{resize:vertical;min-height:300px;font-family:Consolas,Monaco,monospace;font-size:13px;line-height:1.5}.login-form button,.actions button,.editor-actions button{background:var(--dark);color:#fff;border-radius:14px;padding:12px 16px;font-weight:800}.login-form button{background:var(--brand);margin-top:8px}.error{color:#dc2626;min-height:20px}.hint{color:var(--muted);font-size:12px}.layout{grid-template-columns:310px 1fr;min-height:100vh;display:grid}.sidebar{color:#fff;background:#0f172a;flex-direction:column;gap:18px;height:100vh;padding:22px;display:flex;position:sticky;top:0;overflow:auto}.logo-row{border-bottom:1px solid #ffffff1a;align-items:center;gap:12px;padding-bottom:14px;display:flex}.logo-row span{color:#cbd5e1;margin-top:3px;font-size:13px;display:block}nav{gap:8px;display:grid}.nav-item{text-align:left;color:#cbd5e1;background:0 0;border-radius:14px;width:100%;padding:13px 14px;font-weight:700;line-height:1.35}.nav-item:hover,.nav-item.active{color:#fff;background:#ffffff17}.secondary.full{color:#fff;background:#ffffff1a;border-radius:14px;width:100%;margin-top:auto;padding:12px;font-weight:800}.content{padding:28px;overflow:hidden}.topbar{justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:18px;display:flex}.actions{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}.actions button{color:var(--text);border:1px solid var(--line);background:#fff;box-shadow:0 4px 14px #1118270d}.summary-card,.viewer-card,.code-card,.table-card{background:var(--panel);border:1px solid var(--line);border-radius:24px;margin-bottom:18px;box-shadow:0 12px 35px #1118270f}.summary-card{border-left:5px solid var(--brand);flex-wrap:wrap;align-items:center;gap:10px;padding:16px 18px;display:flex}.summary-card span{color:var(--muted)}.viewer-card{background:linear-gradient(#fff,#f9fafb);height:64vh;min-height:480px;padding:24px;overflow:auto}.diagram-canvas{min-width:900px;min-height:620px}.svg-shell svg{height:auto;max-width:none!important}.code-card{padding:18px}.code-card.hidden{display:none}.editor-actions{gap:10px;margin-top:12px;display:flex}.table-card{padding:20px;overflow:auto}table{border-collapse:collapse;width:100%;font-size:14px}th,td{border-bottom:1px solid var(--line);text-align:left;vertical-align:top;padding:12px 14px}th{text-transform:uppercase;letter-spacing:.05em;color:var(--muted);background:#f9fafb;font-size:12px}.row-active td{background:var(--soft)}.error-box{color:#991b1b;white-space:pre-wrap;background:#fef2f2;border:1px solid #fecaca;border-radius:14px;padding:16px}@media (width<=900px){.layout{grid-template-columns:1fr}.sidebar{height:auto;position:relative}.topbar{flex-direction:column}.viewer-card{height:58vh}}.diagram-card,.viewer-card,.mermaid-card,.flow-card{min-height:calc(100vh - 260px)}.diagram-view,.viewer-body,.mermaid-view,.flow-view{justify-content:center;align-items:flex-start;min-height:calc(100vh - 310px);max-height:calc(100vh - 310px);padding:32px;display:flex;overflow:auto}.mermaid{justify-content:center;width:max-content;min-width:100%;display:flex}.mermaid svg{max-width:none!important;height:auto!important}main,.content,.main-content{min-height:100vh}.summary-card,.table-card{margin-top:18px}.viewer-card{padding:18px;display:block}.diagram-canvas{justify-content:center;align-items:flex-start;width:100%;min-height:calc(100vh - 330px);padding:24px 24px 80px;display:flex;min-width:0!important}.svg-shell{width:max-content;margin:0 auto;transform-origin:top!important}.svg-shell svg{margin-left:auto;margin-right:auto;display:block}.diagram-canvas{justify-content:center;align-items:flex-start;padding-top:28px;padding-bottom:120px}.svg-shell{transform-origin:top!important}.svg-shell svg{min-width:760px}.table-card tbody tr{cursor:pointer;transition:background .16s,transform .16s,box-shadow .16s}.table-card tbody tr:hover td{background:#fff7ed}.table-card tbody tr:hover{transform:translateY(-1px)}.table-card tbody tr.row-active td{background:#ffedd5;border-top:1px solid #fed7aa;border-bottom:1px solid #fed7aa}.table-card tbody tr.row-active td:first-child{border-left:4px solid var(--brand);font-weight:800}.sidebar-nav{flex-direction:column;gap:10px;display:flex}.nav-section{border-radius:16px;overflow:hidden}.nav-section summary{cursor:pointer;-webkit-user-select:none;user-select:none;color:#e5e7eb;background:#ffffff0b;border-radius:16px;align-items:center;gap:10px;padding:13px 14px;font-weight:900;list-style:none;transition:background .16s,transform .16s;display:flex}.nav-section summary::-webkit-details-marker{display:none}.nav-section summary:hover{background:#ffffff17;transform:translateY(-1px)}.nav-section summary:after{content:"›";opacity:.8;margin-left:auto;font-size:18px;transition:transform .18s}.nav-section[open] summary:after{transform:rotate(90deg)}.nav-section-icon{background:#ffffff14;border-radius:9px;justify-content:center;align-items:center;width:24px;height:24px;font-size:14px;display:inline-flex}.nav-section-body{flex-direction:column;gap:8px;padding:9px 0 4px 12px;display:flex}.nav-section .nav-item{margin-left:0}.nav-item.disabled{opacity:.48;cursor:not-allowed;background:#ffffff09}aside{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.sidebar-nav{gap:12px}.nav-section{border-radius:18px}.nav-section summary{letter-spacing:.01em;color:#f3f4f6;background:#ffffff0a;padding:12px 14px;font-size:14px;font-weight:800;line-height:1.25;box-shadow:inset 0 0 0 1px #ffffff08}.nav-section summary:hover{background:#ffffff12}.nav-section summary:after{opacity:.75;font-size:16px;font-weight:700}.nav-section-icon{background:#ffffff12;border-radius:8px;width:22px;min-width:22px;height:22px;font-size:12px}.nav-section-body{gap:6px;padding:8px 0 2px 10px}.nav-section .nav-item{text-align:left;letter-spacing:0;color:#e5e7eb;white-space:normal;word-break:break-word;text-wrap:pretty;background:0 0;border:1px solid #0000;border-radius:14px;padding:11px 12px;font-size:13px;font-weight:700;line-height:1.3}.nav-section .nav-item:hover{background:#ffffff0e;border-color:#ffffff0d;transform:none}.nav-section .nav-item.active{color:#fff;box-shadow:inset 3px 0 0 var(--brand);background:#ffffff17;border-color:#ffffff14}.nav-item.disabled{opacity:.58;background:#ffffff06;border-color:#0000}.brand-title{font-size:15px;font-weight:800;line-height:1.2}.brand-subtitle{opacity:.88;font-size:13px;font-weight:500}.logout-btn,button.logout,.sidebar-logout{border-radius:16px;font-size:14px;font-weight:700}@media (width<=768px){.nav-section summary{padding:11px 13px;font-size:13.5px}.nav-section .nav-item{padding:10px 11px;font-size:12.8px}.nav-section-icon{width:20px;min-width:20px;height:20px;font-size:11px}}.sidebar,.sidebar button,.sidebar summary,.sidebar .nav-item,.sidebar .nav-section{-webkit-font-smoothing:antialiased;text-rendering:geometricprecision;font-family:Segoe UI Variable,Segoe UI,Aptos,Inter,system-ui,-apple-system,BlinkMacSystemFont,sans-serif!important}.logo-row strong{letter-spacing:.01em;font-size:15px;font-weight:750}.logo-row span{letter-spacing:.01em;font-size:12.5px;font-weight:450}.nav-section summary{letter-spacing:.005em;font-size:14px!important;font-weight:720!important}.nav-section .nav-item{letter-spacing:0!important;font-size:13.2px!important;font-weight:620!important;line-height:1.34!important}.nav-section .nav-item.active{font-weight:680!important}.secondary.full{letter-spacing:.005em;font-family:Segoe UI Variable,Segoe UI,Aptos,Inter,system-ui,sans-serif!important;font-size:13.5px!important;font-weight:700!important}.viewer-card{background:radial-gradient(circle at top,#fffffff2,#e8eef7eb 42%,#dee6f1f5 100%)!important;border:1px solid #cbd5e1!important;box-shadow:inset 0 1px #fffc,0 16px 42px #0f172a1a!important}.diagram-canvas{border-radius:18px;background:linear-gradient(#f8fafcb8,#e2e8f08c)!important}.diagram-canvas svg .node rect,.diagram-canvas svg .node polygon,.diagram-canvas svg .node circle,.diagram-canvas svg .node ellipse{fill:#fff!important;stroke:#94a3b8!important;stroke-width:1.4px!important}.diagram-canvas svg .edgePath path{stroke:#64748b!important;stroke-width:2px!important}.diagram-canvas svg .arrowheadPath{fill:#64748b!important;stroke:#64748b!important}.diagram-canvas svg text{fill:#111827!important;font-weight:500!important}.flow-detail-card{background:var(--panel);border:1px solid var(--line);border-radius:24px;margin-bottom:18px;padding:20px;box-shadow:0 12px 35px #1118270f}.flow-detail-head{justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:14px;display:flex}.eyebrow.mini{margin:0 0 5px;font-size:11px}.stage-count{color:#9a3412;background:#fff7ed;border:1px solid #fed7aa;border-radius:999px;flex:none;padding:7px 11px;font-size:12px;font-weight:800}.stage-list{gap:10px;display:grid}.stage-item{background:#fff;border:1px solid #e5e7eb;border-radius:18px;overflow:hidden}.stage-item summary{cursor:pointer;-webkit-user-select:none;user-select:none;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:10px;padding:13px 15px;list-style:none;display:grid}.stage-item summary::-webkit-details-marker{display:none}.stage-item summary:after{content:"›";color:#64748b;font-size:18px;transition:transform .16s}.stage-item[open] summary:after{transform:rotate(90deg)}.stage-number{color:#0f172a;background:#f8fafc;border:1px solid #e2e8f0;border-radius:11px;place-items:center;width:32px;height:32px;font-size:13px;font-weight:850;display:inline-grid}.stage-title{color:#111827;font-size:14px;font-weight:800;line-height:1.25}.stage-class{color:#334155;white-space:nowrap;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:999px;padding:6px 10px;font-size:11.5px;font-weight:800}.stage-body{background:#f8fafc;border-top:1px solid #e5e7eb;padding:15px}.stage-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.stage-field{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:13px}.stage-field strong{text-transform:uppercase;letter-spacing:.055em;color:#64748b;margin-bottom:7px;font-size:11.5px;display:block}.stage-field p{color:#1f2937;white-space:pre-wrap;margin:0;font-size:13.5px;line-height:1.48}@media (width<=900px){.flow-detail-head{flex-direction:column}.stage-item summary{grid-template-columns:36px minmax(0,1fr)}.stage-class{grid-column:2;width:fit-content}.stage-grid{grid-template-columns:1fr}}:root{--font-ui:"Inter", "Segoe UI Variable", "Segoe UI", Aptos, system-ui, -apple-system, BlinkMacSystemFont, sans-serif}body,button,input,textarea{-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;font-family:var(--font-ui)!important}.flow-detail-card{border-radius:22px!important;padding:18px!important}.flow-detail-head{margin-bottom:18px!important}.flow-detail-head h2{letter-spacing:-.015em;margin-bottom:6px!important;font-size:17px!important;font-weight:720!important}.flow-detail-head .muted{color:#64748b!important;font-size:13.2px!important;line-height:1.45!important}.eyebrow.mini{letter-spacing:.13em!important;font-size:10.5px!important;font-weight:800!important}.stage-count{padding:6px 10px!important;font-size:11.5px!important;font-weight:750!important}.stage-list{gap:9px!important}.stage-item{box-shadow:0 5px 18px #0f172a09;border-color:#dbe3ee!important;border-radius:16px!important}.stage-item summary{grid-template-columns:36px minmax(0,1fr) auto 18px!important;gap:9px!important;padding:12px 14px!important}.stage-number{color:#1e293b!important;background:#f1f5f9!important;border-radius:10px!important;width:28px!important;height:28px!important;font-size:12px!important;font-weight:760!important}.stage-title{letter-spacing:-.005em;color:#111827!important;font-size:13.2px!important;font-weight:710!important;line-height:1.28!important}.stage-class{color:#334155!important;background:#f8fafc!important;border-color:#dbe3ee!important;padding:5px 9px!important;font-size:10.8px!important;font-weight:720!important}.stage-body{background:#f8fafc!important;padding:14px!important}.stage-grid{gap:10px!important}.stage-field{background:#fffffff0!important;border-color:#dfe6ef!important;border-radius:14px!important;padding:11px 12px!important}.stage-field.wide{margin-bottom:10px!important}.stage-field strong{letter-spacing:.06em!important;color:#64748b!important;margin-bottom:6px!important;font-size:10.6px!important;font-weight:760!important}.stage-field p{color:#253044!important;font-size:12.6px!important;line-height:1.55!important}.table-card table{font-size:12.8px!important}.table-card th{font-size:10.8px!important;font-weight:760!important}.table-card td{line-height:1.42!important}.summary-card{font-size:13.2px!important}.summary-card span{line-height:1.45!important}@media (width<=900px){.stage-item summary{grid-template-columns:34px minmax(0,1fr)!important}.stage-class{margin-top:2px;grid-column:2!important;width:fit-content!important}.stage-field p{font-size:12.8px!important}}.stage-field{position:relative;overflow:hidden}.stage-field:before{content:"";opacity:.95;width:4px;position:absolute;inset:0 auto 0 0}.stage-field-desc{background:#f8fbff!important;border-color:#dbeafe!important}.stage-field-desc:before{background:#60a5fa}.stage-field-desc strong{color:#1d4ed8!important}.stage-field-controls{background:#f7fdfc!important;border-color:#ccfbf1!important}.stage-field-controls:before{background:#14b8a6}.stage-field-controls strong{color:#0f766e!important}.stage-field-records{background:#f7fdf7!important;border-color:#dcfce7!important}.stage-field-records:before{background:#22c55e}.stage-field-records strong{color:#15803d!important}.stage-field-classification{background:#fffaf2!important;border-color:#fed7aa!important}.stage-field-classification:before{background:#f59e0b}.stage-field-classification strong{color:#b45309!important}.stage-field-haccp{background:#fbf9ff!important;border-color:#e9d5ff!important}.stage-field-haccp:before{background:#8b5cf6}.stage-field-haccp strong{color:#6d28d9!important}.stage-class.class-prp{color:#334155!important;background:#f1f5f9!important;border-color:#cbd5e1!important}.stage-class.class-pc{color:#1d4ed8!important;background:#eff6ff!important;border-color:#bfdbfe!important}.stage-class.class-pc-strong{color:#047857!important;background:#ecfdf5!important;border-color:#bbf7d0!important}.stage-class.class-pcc{color:#c2410c!important;background:#fff7ed!important;border-color:#fdba74!important}.stage-class.class-neutral{color:#475569!important;background:#f8fafc!important;border-color:#e2e8f0!important}.stage-field{padding-left:15px!important}
