*,*:before,*:after{box-sizing:border-box}body{margin:0;font-family:Segoe UI,system-ui,-apple-system,sans-serif;background:#0f172a;color:#e2e8f0;-webkit-font-smoothing:antialiased}.app{min-height:100vh}.header{display:flex;justify-content:space-between;align-items:center;padding:.875rem 1.5rem;background:#1e293b;border-bottom:1px solid #334155;position:sticky;top:0;z-index:10;gap:1rem}.header h1{font-size:1.125rem;color:#38bdf8;margin:0;white-space:nowrap}.header-left{display:flex;align-items:center;gap:1rem;min-width:0}.header-right{display:flex;gap:1.25rem;align-items:center;flex-shrink:0}.status{padding:.2rem .65rem;border-radius:1rem;font-size:.7rem;background:#ef4444;color:#fff;font-weight:500;white-space:nowrap}.status.online{background:#22c55e}.stat{text-align:center}.stat-value{display:block;font-size:1.375rem;font-weight:700;color:#38bdf8;line-height:1}.stat-value.running{color:#22c55e}.stat-value.stopped{color:#ef4444}.stat-value.stale{color:#f59e0b}.stat-label{font-size:.68rem;color:#94a3b8}.btn-icon{background:none;border:1px solid #334155;color:#94a3b8;border-radius:.375rem;width:2rem;height:2rem;cursor:pointer;font-size:1rem;display:flex;align-items:center;justify-content:center;text-decoration:none;transition:background .15s,color .15s}.btn-icon:hover{background:#334155;color:#fff}.btn-icon.spinning{animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.main{padding:1.5rem;max-width:1400px;margin:0 auto}.error-banner{background:#7f1d1d;border:1px solid #ef4444;color:#fca5a5;padding:.75rem 1rem;border-radius:.5rem;margin-bottom:1rem;font-size:.875rem}.settings-panel{background:#1e293b;border:1px solid #334155;border-radius:.75rem;margin-bottom:1.25rem;overflow:hidden}.settings-header{display:flex;justify-content:space-between;align-items:center;padding:.75rem 1rem;border-bottom:1px solid #334155}.settings-header h3{margin:0;font-size:.9375rem;color:#38bdf8}.settings-header button{background:none;border:none;color:#94a3b8;font-size:1.125rem;cursor:pointer;padding:.25rem}.settings-body{padding:1rem;display:flex;flex-direction:column;gap:1rem}.settings-section{background:#0f172a;border:1px solid #334155;border-radius:.5rem;padding:.875rem}.section-title{font-size:.8rem;font-weight:600;color:#38bdf8;margin-bottom:.75rem;padding-bottom:.5rem;border-bottom:1px solid #1e293b}.settings-grid{display:flex;gap:.75rem;align-items:flex-end;flex-wrap:wrap}.settings-grid .input-group{flex:1;min-width:180px}.settings-grid .input-group label{font-size:.7rem;color:#94a3b8;margin-bottom:.25rem;display:block}.settings-grid .input-group input{padding:.5rem .625rem;background:#1e293b;border:1px solid #334155;border-radius:.375rem;color:#e2e8f0;width:100%;font-size:.8rem}.settings-grid .input-group input:focus{border-color:#38bdf8;outline:none}.input-small{max-width:150px}.settings-actions{display:flex;justify-content:flex-end;gap:.5rem}.btn-test{padding:.5rem 1rem;background:#22c55e;color:#fff;border:none;border-radius:.375rem;font-size:.8rem;font-weight:500;cursor:pointer;white-space:nowrap}.btn-test:hover:not(:disabled){background:#16a34a}.btn-test:disabled{opacity:.5;cursor:not-allowed}.btn-secondary{padding:.5rem 1rem;background:#334155;color:#94a3b8;border:none;border-radius:.375rem;font-size:.8rem;font-weight:500;cursor:pointer}.btn-secondary:hover{background:#475569;color:#fff}.setup{max-width:440px;margin:3rem auto;background:#1e293b;padding:2rem;border-radius:1rem;border:1px solid #334155}.setup-icon{font-size:2.5rem;text-align:center;margin-bottom:.5rem}.setup h2{margin:0 0 .5rem;text-align:center}.setup>p{color:#94a3b8;margin:0 0 1.5rem;text-align:center;font-size:.875rem}.setup-form{display:flex;flex-direction:column;gap:1rem}.input-group{display:flex;flex-direction:column;gap:.375rem}.input-group label{font-size:.75rem;color:#94a3b8;font-weight:500}.input-group input{padding:.625rem .75rem;border:1px solid #334155;border-radius:.5rem;background:#0f172a;color:#e2e8f0;font-size:.875rem;outline:none;transition:border-color .15s}.input-group input:focus{border-color:#38bdf8}.input-wrap{position:relative}.input-wrap input{width:100%;padding-right:2.5rem}.toggle-eye{position:absolute;right:.75rem;top:50%;transform:translateY(-50%);cursor:pointer;-webkit-user-select:none;user-select:none}.btn-primary{padding:.75rem;background:#38bdf8;color:#0f172a;border:none;border-radius:.5rem;font-weight:600;cursor:pointer;font-size:.875rem;transition:background .15s}.btn-primary:hover:not(:disabled){background:#0ea5e9}.btn-primary:disabled{opacity:.5;cursor:not-allowed}.setup-help{margin-top:1.25rem;font-size:.8rem;color:#64748b;text-align:center}.setup-help p{margin:.25rem 0}.setup-help a{color:#38bdf8}.empty{text-align:center;padding:4rem 2rem;color:#64748b}.empty-icon{font-size:3rem;margin-bottom:.5rem}.empty-hint{font-size:.8rem;color:#475569;margin-top:.5rem}.agents-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(380px,1fr));gap:1.25rem}.agent-card{background:#1e293b;border:1px solid #334155;border-radius:.875rem;overflow:hidden;transition:border-color .2s}.agent-card.stale{border-color:#92400e;opacity:.8}.agent-card.warning:not(.stale){border-color:#7f1d1d}.agent-header{display:flex;justify-content:space-between;align-items:center;padding:.875rem 1rem;border-bottom:1px solid #334155;gap:.5rem}.agent-name{display:flex;align-items:center;gap:.5rem;font-weight:600;font-size:.9375rem;min-width:0}.agent-header-right{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.dot-online{background:#22c55e;box-shadow:0 0 6px #22c55e80;animation:pulse 2s infinite}.dot-stale{background:#f59e0b}.dot-warning{background:#ef4444;box-shadow:0 0 6px #ef444480;animation:pulse 1s infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.4}}.stale-badge{font-size:.65rem;background:#78350f;color:#fbbf24;padding:.125rem .5rem;border-radius:1rem;white-space:nowrap}.warning-badge{font-size:.65rem;background:#7f1d1d;color:#fca5a5;padding:.125rem .5rem;border-radius:1rem;white-space:nowrap}.agent-time{font-size:.7rem;color:#64748b;white-space:nowrap}.btn-delete{background:none;border:none;cursor:pointer;font-size:.875rem;opacity:.4;padding:.125rem;transition:opacity .15s}.btn-delete:hover{opacity:1}.system-info{padding:.875rem 1rem;border-bottom:1px solid #334155}.info-item{display:flex;align-items:center;gap:.625rem;margin-bottom:.5rem}.info-label{width:36px;font-size:.7rem;color:#94a3b8;font-weight:500;flex-shrink:0}.info-value{width:44px;text-align:right;font-size:.8rem;font-weight:600}.info-value.low{color:#22c55e}.info-value.medium{color:#f59e0b}.info-value.high{color:#ef4444}.progress-bar{flex:1;height:5px;background:#0f172a;border-radius:3px;overflow:hidden}.progress-fill{height:100%;transition:width .5s ease;border-radius:3px}.progress-fill.low{background:#22c55e}.progress-fill.medium{background:#f59e0b}.progress-fill.high{background:#ef4444}.mem-detail{font-size:.7rem;color:#475569;text-align:right;margin-top:.125rem}.apps-list{padding:.875rem 1rem;display:flex;flex-direction:column;gap:.625rem}.app-item{padding:.75rem;background:#0f172a;border-radius:.5rem;border-left:3px solid #334155}.app-item.running{border-left-color:#22c55e}.app-header{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}.app-status{width:7px;height:7px;border-radius:50%;background:#ef4444;flex-shrink:0}.app-status.active{background:#22c55e}.app-name{font-weight:500;flex:1;font-size:.875rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app-badge{font-size:.65rem;padding:.15rem .5rem;border-radius:1rem;font-weight:500;white-space:nowrap;flex-shrink:0}.badge-running{background:#14532d;color:#86efac}.badge-stopped{background:#450a0a;color:#fca5a5}.app-metrics{display:flex;flex-wrap:wrap;gap:.5rem 1rem;font-size:.72rem;color:#64748b;margin-bottom:.5rem}.app-metrics b{color:#94a3b8}.app-actions{display:flex;gap:.375rem;flex-wrap:wrap}.app-actions button{padding:.3rem .7rem;font-size:.75rem;border:none;border-radius:.375rem;cursor:pointer;font-weight:500;transition:opacity .15s}.app-actions button:disabled{opacity:.5;cursor:not-allowed}.btn-start{background:#22c55e;color:#fff}.btn-start:hover:not(:disabled){background:#16a34a}.btn-stop{background:#ef4444;color:#fff}.btn-stop:hover:not(:disabled){background:#dc2626}.btn-restart{background:#f59e0b;color:#fff}.btn-restart:hover:not(:disabled){background:#d97706}.btn-log{background:#334155;color:#94a3b8}.btn-log:hover{background:#475569;color:#fff}.spinner{width:2rem;height:2rem;border:3px solid #334155;border-top-color:#38bdf8;border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 1rem}.toast{position:fixed;bottom:1.5rem;right:1.5rem;padding:.75rem 1.25rem;border-radius:.5rem;font-size:.875rem;font-weight:500;z-index:100;max-width:320px;animation:slideIn .2s ease}@keyframes slideIn{0%{transform:translateY(.5rem);opacity:0}to{transform:translateY(0);opacity:1}}.toast.success{background:#14532d;color:#86efac;border:1px solid #22c55e40}.toast.error{background:#450a0a;color:#fca5a5;border:1px solid #ef444440}.log-modal{position:fixed;top:0;right:0;bottom:0;left:0;background:#000000bf;display:flex;align-items:center;justify-content:center;z-index:1000;padding:1rem}.log-modal-content{background:#1e293b;border:1px solid #334155;border-radius:.75rem;width:100%;max-width:820px;max-height:80vh;display:flex;flex-direction:column}.log-modal-header{display:flex;justify-content:space-between;align-items:center;padding:1rem;border-bottom:1px solid #334155;gap:1rem}.log-modal-header h3{margin:0;font-size:1rem;color:#38bdf8;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.log-modal-header button{background:none;border:none;color:#94a3b8;font-size:1.25rem;cursor:pointer;flex-shrink:0}.log-modal-body{flex:1;overflow:auto;padding:1rem}.log-modal-body pre{font-size:.75rem;color:#e2e8f0;white-space:pre-wrap;word-break:break-all;margin:0;font-family:Consolas,Monaco,Courier New,monospace;line-height:1.5}.log-empty{color:#64748b;text-align:center;padding:2rem;margin:0}.log-modal-footer{padding:.75rem 1rem;border-top:1px solid #334155;display:flex;justify-content:flex-end;gap:.5rem}.log-modal-footer button{padding:.5rem 1rem;border:none;border-radius:.375rem;cursor:pointer;font-size:.875rem}.login{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#0f172a}.login-card{background:#1e293b;padding:2.5rem 2rem;border-radius:1rem;border:1px solid #334155;width:100%;max-width:380px;text-align:center}.login-icon{font-size:2.5rem;margin-bottom:.5rem}.login-card h2{margin:0 0 .25rem;color:#38bdf8;font-size:1.375rem}.login-card>p{color:#94a3b8;margin:0 0 1.5rem;font-size:.875rem}.login-form{display:flex;flex-direction:column;gap:.75rem}.login-form input{padding:.75rem;background:#0f172a;border:1px solid #334155;border-radius:.5rem;color:#e2e8f0;font-size:.9375rem;text-align:center;outline:none;transition:border-color .15s}.login-form input:focus{border-color:#38bdf8}.login-error{color:#fca5a5;font-size:.8rem;background:#450a0a;padding:.5rem;border-radius:.375rem}@media (max-width: 640px){.header{padding:.75rem 1rem}.header-right{gap:.75rem}.stat-value{font-size:1.125rem}.main{padding:1rem}.agents-grid{grid-template-columns:1fr}}
