.app-shell{min-height:100vh;display:flex;flex-direction:column}.app-header{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1.5rem;border-bottom:1px solid var(--color-border);background:var(--color-surface)}.header-left{display:flex;align-items:center;gap:1rem}.logo{font-size:1.25rem;font-weight:700;background:linear-gradient(135deg,var(--color-primary),#a78bfa);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.app-main{flex:1;max-width:960px;width:100%;margin:0 auto;padding:2rem 1.5rem}.btn-primary{background:var(--color-primary);color:#fff;font-weight:600;padding:.625rem 1.25rem;border-radius:var(--radius);font-size:.9rem;transition:background .15s}.btn-primary:hover:not(:disabled){background:var(--color-primary-hover)}.btn-primary:disabled{opacity:.5;cursor:not-allowed}.btn-full{width:100%}.btn-ghost{background:transparent;color:var(--color-text-muted);padding:.5rem .75rem;border-radius:var(--radius);font-size:.85rem;transition:color .15s}.btn-ghost:hover{color:var(--color-text)}.field{display:flex;flex-direction:column;gap:.35rem}.field label{font-size:.8rem;color:var(--color-text-muted);font-weight:500}.field input,.task-input{background:var(--color-bg);border:1px solid var(--color-border);color:var(--color-text);padding:.625rem .75rem;border-radius:var(--radius);font-size:.9rem;outline:none;transition:border-color .15s}.field input:focus,.task-input:focus{border-color:var(--color-primary)}.error-banner{background:#ff4d6a1a;border:1px solid var(--color-danger);color:var(--color-danger);padding:.5rem .75rem;border-radius:var(--radius);font-size:.85rem}.login-page{min-height:100vh;display:grid;place-items:center;padding:1.5rem}.login-card{width:100%;max-width:380px;background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:2rem}.login-header{text-align:center;margin-bottom:1.5rem}.login-subtitle{color:var(--color-text-muted);font-size:.85rem;margin-top:.25rem}.login-form{display:flex;flex-direction:column;gap:1rem}.dashboard{display:flex;flex-direction:column;gap:2rem}.hero-section{text-align:center}.hero-section h2{font-size:1.5rem;font-weight:700}.text-muted{color:var(--color-text-muted)}.text-sm{font-size:.8rem}.busy-banner{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;background:#6c63ff14;border:1px solid rgba(108,99,255,.25);border-radius:var(--radius);color:var(--color-text);cursor:pointer;transition:background .15s;font-size:.9rem}.busy-banner:hover{background:#6c63ff26}.busy-link{margin-left:auto;color:var(--color-primary);font-weight:600;font-size:.85rem}.mode-toggle{display:flex;gap:0;border:1px solid var(--color-border);border-radius:var(--radius);overflow:hidden;width:fit-content}.mode-btn{padding:.5rem 1.25rem;font-size:.85rem;font-weight:600;background:transparent;color:var(--color-text-muted);border:none;transition:all .15s;cursor:pointer}.mode-btn:hover:not(:disabled){color:var(--color-text);background:var(--color-surface-hover)}.mode-btn:disabled{opacity:.35;cursor:not-allowed}.mode-btn-active{background:var(--color-primary);color:#fff}.mode-btn-active:hover:not(:disabled){background:var(--color-primary-hover);color:#fff}.mode-hint{margin-top:-.25rem}.mode-badge{font-size:.65rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:.1rem .45rem;border-radius:999px}.mode-badge-self-hosted{background:#60a5fa26;color:#60a5fa}.mode-badge-cloud{background:#c084fc26;color:#c084fc}.task-form{display:flex;flex-direction:column;gap:.75rem}.task-input-row{display:flex;gap:.75rem;align-items:flex-end}.task-input{flex:1;resize:vertical;min-height:72px}.btn-submit{align-self:stretch;min-width:80px}.spinner{display:inline-block;width:18px;height:18px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin .6s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.history-section h3,.steps-section h3,.viewer-section h3,.result-section h3,.progress-section h3{font-size:1rem;font-weight:600;margin-bottom:.75rem}.task-list{list-style:none;display:flex;flex-direction:column;gap:.5rem}.task-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius);padding:.75rem 1rem;cursor:pointer;transition:background .15s}.task-card:hover{background:var(--color-surface-hover)}.task-card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.35rem}.task-summary{font-size:.85rem;color:var(--color-text-muted)}.status-badge{font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;padding:.15rem .5rem;border-radius:999px}.status-running{background:#6c63ff26;color:var(--color-primary);animation:pulse-badge 2s ease-in-out infinite}@keyframes pulse-badge{0%,to{opacity:1}50%{opacity:.6}}.status-completed{background:#22c55e26;color:var(--color-success)}.status-error{background:#ff4d6a26;color:var(--color-danger)}.status-max_steps_reached{background:#f59e0b26;color:var(--color-warning)}.status-cancelled{background:#9ca3af26;color:#9ca3af}.task-view{display:flex;flex-direction:column;gap:1.5rem}.task-view-header{display:flex;align-items:center;gap:1rem}.viewer-section{display:flex;flex-direction:column}.viewer-frame-wrapper{background:#000;border:1px solid var(--color-border);border-radius:var(--radius-lg);overflow:hidden}.viewer-frame{width:100%;height:560px;border:none}.result-section{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius);padding:1rem}.progress-section{border-color:#6c63ff59}.progress-summary{font-size:.95rem;line-height:1.5;color:var(--color-text)}.result-pre{background:var(--color-bg);padding:.75rem;border-radius:var(--radius);font-size:.8rem;overflow-x:auto;white-space:pre-wrap;word-break:break-word}.steps-list{display:flex;flex-direction:column;gap:.5rem;padding-left:1.25rem}.step-item{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius);padding:.625rem .75rem}.step-header{display:flex;gap:.5rem;align-items:baseline;flex-wrap:wrap}.step-action{font-weight:600;color:var(--color-primary);font-size:.85rem}.step-args{font-size:.75rem;color:var(--color-text-muted);word-break:break-all}.step-reasoning{font-size:.8rem;color:var(--color-text-muted);margin-top:.25rem;font-style:italic;line-height:1.5}.loading-state{display:flex;flex-direction:column;align-items:center;gap:1rem;padding:3rem 0}.spinner-lg{width:32px;height:32px;border-width:3px}.spinner-sm{width:14px;height:14px;border-width:2px;margin-left:.5rem;vertical-align:middle}.completion-banner{display:flex;gap:1rem;align-items:flex-start;padding:1rem 1.25rem;border-radius:var(--radius-lg);border:1px solid}.completion-success{background:#22c55e14;border-color:#22c55e40}.completion-error{background:#ff4d6a14;border-color:#ff4d6a40}.completion-warning{background:#f59e0b14;border-color:#f59e0b40}.completion-icon{font-size:1.5rem;line-height:1;flex-shrink:0}.completion-success .completion-icon{color:var(--color-success)}.completion-error .completion-icon{color:var(--color-danger)}.completion-warning .completion-icon{color:var(--color-warning)}.completion-body h3{font-size:1rem;font-weight:600;margin-bottom:.25rem}.completion-body p{font-size:.9rem;color:var(--color-text-muted);line-height:1.5}.live-dot{display:inline-block;width:8px;height:8px;background:var(--color-success);border-radius:50%;margin-left:.5rem;vertical-align:middle;animation:pulse-dot 1.5s ease-in-out infinite}@keyframes pulse-dot{0%,to{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.8)}}.step-count{margin-left:.5rem;font-weight:400}.step-number{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:var(--color-border);color:var(--color-text-muted);font-size:.7rem;font-weight:700;flex-shrink:0}.step-action-done{color:var(--color-success)}.step-action-navigate{color:#60a5fa}.step-action-scrape{color:#c084fc}.step-action-error{color:var(--color-danger)}.step-action-wait_for_human{color:#f59e0b}.hitl-banner{display:flex;gap:1rem;align-items:flex-start;padding:1.25rem 1.5rem;border-radius:var(--radius-lg);border:2px solid rgba(245,158,11,.4);background:#f59e0b0f;animation:hitl-pulse 2.5s ease-in-out infinite}@keyframes hitl-pulse{0%,to{border-color:#f59e0b66}50%{border-color:#f59e0bb3}}.hitl-icon{font-size:1.75rem;line-height:1;flex-shrink:0}.hitl-body{flex:1}.hitl-body h3{font-size:1.05rem;font-weight:700;margin-bottom:.35rem;color:#f59e0b}.hitl-body p{font-size:.9rem;color:var(--color-text-muted);line-height:1.55}.hitl-instructions{margin-top:.35rem;font-size:.85rem!important}.btn-continue{margin-top:.75rem;padding:.6rem 2rem;font-size:.95rem;display:inline-flex;align-items:center;gap:.5rem}.hitl-dot{display:inline-block;width:8px;height:8px;background:#f59e0b;border-radius:50%;margin-left:.5rem;vertical-align:middle;animation:pulse-dot 1.5s ease-in-out infinite}.status-waiting_for_human{background:#f59e0b26;color:#f59e0b;animation:pulse-badge 2s ease-in-out infinite}.busy-banner-waiting{border-color:#f59e0b59;background:#f59e0b14}.btn-stop{margin-left:auto;background:transparent;color:var(--color-danger);border:1px solid var(--color-danger);padding:.35rem .85rem;border-radius:var(--radius);font-size:.8rem;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:.35rem;transition:all .15s}.btn-stop:hover:not(:disabled){background:var(--color-danger);color:#fff}.btn-stop:disabled{opacity:.5;cursor:not-allowed}.completion-cancelled{background:#9ca3af14;border-color:#9ca3af40}.completion-cancelled .completion-icon{color:#9ca3af}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:root{--color-bg: #0a0a0f;--color-surface: #12121a;--color-surface-hover: #1a1a26;--color-border: #2a2a3a;--color-text: #e4e4ed;--color-text-muted: #8888a0;--color-primary: #6c63ff;--color-primary-hover: #7d75ff;--color-danger: #ff4d6a;--color-success: #22c55e;--color-warning: #f59e0b;--radius: 8px;--radius-lg: 12px}html{color-scheme:dark}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--color-bg);color:var(--color-text);line-height:1.6;min-height:100vh}a{color:var(--color-primary);text-decoration:none}button{cursor:pointer;border:none;font-family:inherit}input,textarea{font-family:inherit}
