*{box-sizing:border-box}html,body{margin:0;height:100%;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:#f4f6f8;color:#1a1a2e}.app-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 1.25rem;background:#1a1a2e;color:#fff;border-bottom:3px solid #4f46e5}.brand h1{margin:0;font-size:1.25rem}.brand p{margin:.15rem 0 0;font-size:.85rem;opacity:.8}.app-nav a{color:#c7d2fe;text-decoration:none;padding:.4rem .75rem;border-radius:999px;border:1px solid rgba(255,255,255,.2);font-size:.85rem}.app-nav a:hover{background:#ffffff1a}.toolbar{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.whatsapp-widget{position:relative;display:inline-flex;align-items:center}.whatsapp-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:2.35rem;height:2.35rem;padding:0!important;border:none!important;border-radius:999px!important;background:linear-gradient(145deg,#4ade80,#16a34a)!important;color:#fff!important;box-shadow:0 2px 8px #16a34a73}.whatsapp-icon-btn:hover{background:linear-gradient(145deg,#22c55e,#15803d)!important;transform:scale(1.06)}.whatsapp-popup{position:absolute;top:calc(100% + .5rem);left:0;z-index:30;width:min(18rem,85vw);padding:.9rem 1rem;border-radius:12px;background:#fff;color:#0f172a;box-shadow:0 12px 32px #00000038}.whatsapp-popup.hidden{display:none}.whatsapp-popup h3{margin:0 0 .4rem;font-size:.95rem}.whatsapp-popup p{margin:0 0 .75rem;font-size:.82rem;color:#475569;line-height:1.4}.whatsapp-open-link{display:block;text-align:center;text-decoration:none;padding:.5rem .75rem;border-radius:8px;background:#16a34a;color:#fff;font-size:.85rem;font-weight:600}.whatsapp-open-link:hover{background:#15803d}.email-widget{position:relative;display:inline-flex;align-items:center}.email-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:2.35rem;height:2.35rem;padding:0!important;border:none!important;border-radius:999px!important;background:linear-gradient(145deg,#2dd4bf,#0d9488)!important;color:#fff!important;box-shadow:0 2px 8px #0d948873}.email-icon-btn:hover{background:linear-gradient(145deg,#14b8a6,#0f766e)!important;transform:scale(1.06)}.email-popup{position:absolute;top:calc(100% + .5rem);left:0;z-index:30;width:min(18rem,85vw);padding:.9rem 1rem;border-radius:12px;background:#fff;color:#0f172a;box-shadow:0 12px 32px #00000038}.email-popup.hidden{display:none}.email-popup h3{margin:0 0 .4rem;font-size:.95rem}.email-popup p{margin:0 0 .75rem;font-size:.82rem;color:#475569;line-height:1.4}.email-open-btn{display:block;width:100%;text-align:center;padding:.5rem .75rem;border:none;border-radius:8px;background:#0d9488;color:#fff;font-size:.85rem;font-weight:600;cursor:pointer}.email-open-btn:hover{background:#0f766e}.email-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:1rem}.email-modal.hidden{display:none}.email-modal-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;background:#0000008c}.email-modal-card{position:relative;z-index:1;width:min(42rem,100%);max-height:90vh;display:flex;flex-direction:column;background:#fff;color:#0f172a;border-radius:14px;box-shadow:0 20px 48px #00000047;overflow:hidden}.email-modal-header{display:flex;align-items:center;justify-content:space-between;padding:.85rem 1rem;border-bottom:1px solid #e2e8f0;background:#f8fafc}.email-modal-header h2{margin:0;font-size:1.05rem}.email-modal-close{border:none;background:transparent;font-size:1.4rem;line-height:1;cursor:pointer;color:#64748b}.email-modal-tabs{display:flex;border-bottom:1px solid #e2e8f0}.email-modal-tabs button{flex:1;border:none;background:transparent;padding:.65rem 1rem;cursor:pointer;color:#64748b;border-bottom:2px solid transparent}.email-modal-tabs button.active{color:#0d9488;border-bottom-color:#0d9488;font-weight:600}.email-modal-body{padding:1rem;overflow-y:auto}.email-field{display:block;margin-bottom:.75rem;font-size:.82rem;font-weight:600;color:#334155}.email-field input,.email-field textarea{display:block;width:100%;margin-top:.35rem;padding:.5rem .65rem;border:1px solid #cbd5e1;border-radius:8px;font:inherit;font-weight:400}.email-field-row{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}.email-file-error{margin:0 0 .5rem;font-size:.82rem;color:#b91c1c}.email-file-error.hidden{display:none}.email-attachments ul{margin:.5rem 0 0;padding:0;list-style:none;font-size:.82rem}.email-attachments li{display:flex;align-items:center;gap:.5rem;margin-bottom:.25rem}.email-remove-attachment{border:none;background:transparent;color:#dc2626;cursor:pointer;font-size:.78rem}.email-preview-meta{margin-bottom:.75rem;padding-bottom:.75rem;border-bottom:1px solid #e2e8f0;font-size:.85rem;color:#64748b}.email-preview-meta p{margin:.2rem 0}.email-preview-body{font-size:.9rem;line-height:1.5}.email-send-status{margin:0 1rem;padding:.5rem .75rem;border-radius:8px;font-size:.85rem}.email-send-status.hidden{display:none}.email-send-status.success{background:#dcfce7;color:#166534}.email-send-status.error{background:#fee2e2;color:#991b1b}.email-modal-footer{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem;padding:.85rem 1rem;border-top:1px solid #e2e8f0;background:#f8fafc}.email-modal-footer button{border:1px solid #cbd5e1;background:#fff;color:#334155;padding:.45rem .85rem;border-radius:8px;cursor:pointer;font-size:.85rem}.email-modal-footer button.primary{border-color:#0d9488;background:#0d9488;color:#fff}.email-modal-footer button.primary:hover{background:#0f766e}.email-modal-footer button:disabled{opacity:.6;cursor:not-allowed}.toolbar button{border:1px solid #6366f1;background:transparent;color:#fff;padding:.45rem .85rem;border-radius:6px;cursor:pointer;font-size:.875rem}.toolbar button:hover{background:#6366f133}.toolbar button.primary{background:#4f46e5;border-color:#4f46e5}.toolbar button.primary:hover{background:#4338ca}.status{font-size:.8rem;margin-left:.5rem;min-width:12rem}.status.ok{color:#86efac}.status.error{color:#fca5a5}main{height:calc(100vh - 72px)}#blocklyDiv{width:100%;height:100%}.dispatch-panel{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a8c;display:flex;align-items:center;justify-content:center;z-index:20}.dispatch-panel.hidden{display:none}.dispatch-card{width:min(760px,92vw);max-height:92vh;overflow:auto;background:#fff;color:#1a1a2e;border-radius:10px;box-shadow:0 20px 45px #0003;padding:1rem}.dispatch-card h3{margin:0 0 .5rem}.dispatch-card p{margin:0 0 .75rem;font-size:.9rem}#dispatch-prompt{width:100%;height:180px;border:1px solid #cbd5e1;border-radius:8px;padding:.6rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.8rem;line-height:1.3;resize:vertical}.token-estimate-banner{margin:.75rem 0 .25rem;padding:.75rem .85rem;border:1px solid #f59e0b;border-radius:8px;background:#fffbeb;color:#78350f}.token-estimate-banner strong{display:block;margin-bottom:.35rem;font-size:.9rem}#token-estimate-summary{margin:0 0 .4rem;font-size:.88rem;font-weight:600}#token-estimate-details{margin:0;padding-left:1.1rem;font-size:.8rem;line-height:1.45}.token-estimate-note{margin:.45rem 0 0;font-size:.75rem;opacity:.9}.token-estimate-warnings{margin:.4rem 0 0;font-size:.8rem;color:#9a3412;white-space:pre-wrap}.token-estimate-banner.is-blocked{border-color:#dc2626;background:#fef2f2;color:#7f1d1d}.dispatch-actions{margin-top:.75rem;display:flex;gap:.5rem;flex-wrap:wrap}.dispatch-actions button{border:1px solid #6366f1;background:transparent;color:#1f2937;padding:.42rem .8rem;border-radius:6px;cursor:pointer}.dispatch-actions button.primary{background:#4f46e5;color:#fff}.cursor-api-result{margin-top:.85rem;border-top:1px solid #e2e8f0;padding-top:.75rem}.cursor-api-result.hidden{display:none}.cursor-api-result h4{margin:0 0 .4rem;font-size:.85rem}#cursor-api-response,#cursor-agent-output{margin:0 0 .75rem;max-height:180px;overflow:auto;padding:.6rem;border:1px solid #cbd5e1;border-radius:8px;background:#0f172a;color:#e2e8f0;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.72rem;line-height:1.35;white-space:pre-wrap;word-break:break-word}#cursor-agent-output{max-height:260px;border-color:#818cf8}.cursor-output-status{margin:0 0 .35rem;font-size:.8rem;color:#475569}.guide-panel{position:fixed;top:72px;right:0;width:min(520px,100vw);height:calc(100vh - 72px);background:#fff;border-left:1px solid #cbd5e1;box-shadow:-8px 0 24px #00000014;z-index:15;overflow:auto}.guide-panel.hidden{display:none}.guide-card{padding:1rem 1.1rem 1.5rem}.guide-header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem}.guide-header h2{margin:0;font-size:1.05rem}.guide-close{border:none;background:#e2e8f0;width:2rem;height:2rem;border-radius:6px;cursor:pointer;font-size:1.25rem;line-height:1}.guide-section{margin-bottom:1.25rem}.guide-section h3{margin:0 0 .5rem;font-size:.95rem}.guide-section h4{margin:0 0 .35rem;font-size:.8rem;color:#475569}.guide-steps{margin:0;padding-left:1.2rem;font-size:.85rem;line-height:1.45}.guide-note{margin:.5rem 0 0;font-size:.8rem;color:#64748b}.guide-table-wrap{overflow-x:auto;border:1px solid #e2e8f0;border-radius:8px}.guide-table{width:100%;border-collapse:collapse;font-size:.72rem}.guide-table th,.guide-table td{border-bottom:1px solid #e2e8f0;padding:.35rem .45rem;text-align:left;vertical-align:top}.guide-table th{background:#f8fafc;font-weight:600}.guide-preview-header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.5rem}.guide-preview-header button{border:1px solid #6366f1;background:#fff;color:#4338ca;padding:.3rem .6rem;border-radius:6px;cursor:pointer;font-size:.75rem}.guide-preview-grid{display:grid;grid-template-columns:1fr;gap:.75rem}.guide-json{margin:0;padding:.5rem;background:#0f172a;color:#e2e8f0;border-radius:8px;font-size:.68rem;line-height:1.35;max-height:220px;overflow:auto;white-space:pre-wrap;word-break:break-word}.guide-error{margin:.5rem 0 0;font-size:.8rem;color:#b91c1c}.guide-error.hidden{display:none}main.guide-open #blocklyDiv{width:calc(100% - min(520px,100vw))}@media(max-width:900px){.guide-panel{width:100vw;top:auto;bottom:0;height:55vh;border-left:none;border-top:1px solid #cbd5e1}main.guide-open #blocklyDiv{width:100%;height:calc(45vh - 72px)}}
