/* Vely Agents shell. Tokens sampled from the call frames (f00460, f00499). */
:root{
  --bg:#141414; --sidebar:#0e0e0e; --surface:#1b1b1b; --surface-2:#202020; --input:#262626;
  --hover:#1f1f1f; --active:#232323; --border:#262626; --border-soft:#1e1e1e;
  --text:#ececec; --text-2:#b4b4b4; --muted:#7c7c7c; --faint:#5a5a5a;
  --accent:#658ad8; --blue:#4f7cf0; --green:#3fb26b; --amber:#e3a33b; --red:#e2554f; --purple:#a77de8; --orange:#e8873a;
  --radius:8px; --radius-sm:6px;
  --font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; --mono:"JetBrains Mono",ui-monospace,Menlo,monospace;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--text);font:13px/1.45 var(--font);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;cursor:pointer}
input,textarea,select{font:inherit;color:var(--text)}
#app{display:flex;height:100vh;overflow:hidden}

/* sidebar */
#sidebar{width:200px;flex:none;background:var(--sidebar);border-right:1px solid var(--border-soft);display:flex;flex-direction:column;padding:10px 8px 8px}
.sb-brand{display:flex;align-items:center;gap:8px;padding:4px 6px 10px;font-weight:600;font-size:13.5px}
.sb-logo{width:20px;height:20px;border-radius:5px;background:#e9e9e9;color:#111;display:grid;place-items:center;font-weight:700;font-size:12px}
.sb-brand .sp{flex:1}
.sb-brand .mini{color:var(--muted);font-size:11px}
.sb-create{display:flex;align-items:center;justify-content:center;gap:6px;height:28px;border-radius:6px;background:#393939;border:0;margin:0 0 10px;font-weight:500}
.sb-create:hover{background:#444}
.sb-scroll{flex:1;overflow:auto;margin:0 -4px;padding:0 4px}
.sb-group{color:var(--muted);font-size:11px;padding:7px 8px 2px;font-weight:500}
.sb-item{display:flex;align-items:center;gap:9px;height:24px;padding:0 8px;border-radius:6px;color:#d0d0d0;font-size:12.5px;font-weight:500}
.sb-item:hover{background:var(--hover);color:var(--text)}
.sb-item.active{background:var(--active);color:var(--text)}
.sb-item .ic{width:15px;height:15px;display:grid;place-items:center;color:var(--muted);flex:none}
.sb-item.active .ic{color:var(--text)}
.sb-item .count{margin-left:auto;background:#2b2b2b;color:var(--text-2);font-size:10.5px;border-radius:9px;padding:0 6px;line-height:16px}
.sb-foot{border-top:1px solid var(--border-soft);padding-top:6px;margin-top:6px}

/* main */
#main{flex:1;display:flex;flex-direction:column;min-width:0}
#topbar{height:44px;flex:none;display:flex;align-items:center;padding:0 14px;gap:12px;border-bottom:1px solid var(--border-soft)}
.tb-left{display:flex;align-items:center;gap:4px;flex:1;min-width:0}
.icon-btn{background:none;border:0;color:var(--muted);width:24px;height:24px;border-radius:5px;font-size:17px;line-height:1}
.icon-btn:hover{background:var(--hover);color:var(--text)}
#crumbs{margin-left:8px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#crumbs b{color:var(--text);font-weight:500}
#crumbs .sep{color:var(--faint);margin:0 6px}
.tb-search{width:340px;height:28px;border-radius:6px;background:#1a1a1a;border:1px solid var(--border);display:flex;align-items:center;gap:8px;padding:0 10px;color:var(--muted);cursor:text}
.tb-search .ico{transform:rotate(-45deg);font-size:13px}
.tb-search kbd{margin-left:auto;font:10.5px var(--font);color:var(--faint)}
.tb-right{flex:1}
#view{flex:1;overflow:auto;position:relative}

/* generic page */
.page{padding:22px 28px 40px;max-width:1280px}
.page-h{display:flex;align-items:flex-start;gap:12px;margin-bottom:14px}
.page-h h1{font-size:18px;font-weight:600;margin:0}
.page-h .sub{color:var(--muted);margin-top:3px}
.page-h .actions{margin-left:auto;display:flex;gap:8px}
.btn{height:28px;padding:0 11px;border-radius:6px;border:1px solid var(--border);background:var(--surface);display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:500;color:var(--text)}
.btn:hover{background:#262626}
.btn.primary{background:#ececec;color:#111;border-color:#ececec}
.btn.primary:hover{background:#fff}
.btn.ghost{background:none;border-color:transparent;color:var(--text-2)}
.btn.ghost:hover{background:var(--hover)}
.btn.sm{height:24px;padding:0 8px;font-size:12px}
.tabs{display:flex;gap:2px;border-bottom:1px solid var(--border-soft);margin-bottom:16px}
.tab{padding:7px 10px;color:var(--muted);border:0;background:none;border-bottom:2px solid transparent;margin-bottom:-1px;font-size:12.5px}
.tab:hover{color:var(--text)}
.tab.active{color:var(--text);border-bottom-color:var(--text)}
.seg{display:inline-flex;background:#1a1a1a;border:1px solid var(--border);border-radius:7px;padding:2px;gap:2px}
.seg button{border:0;background:none;color:var(--muted);height:22px;padding:0 9px;border-radius:5px;font-size:12px}
.seg button.on{background:#333;color:var(--text)}
.card{background:var(--surface);border:1px solid var(--border-soft);border-radius:var(--radius);padding:14px 16px}
.card h3{margin:0 0 10px;font-size:13px;font-weight:600}
.grid{display:grid;gap:12px}
.kpi .l{color:var(--muted);font-size:12px}
.kpi .v{font-size:20px;font-weight:600;margin-top:4px}
.kpi .d{font-size:11.5px;margin-top:2px}
.up{color:var(--green)} .down{color:var(--red)}
.field{display:flex;flex-direction:column;gap:5px}
.field label{color:var(--text-2);font-size:12px}
.inp,select.inp,textarea.inp{background:var(--input);border:1px solid #2c2c2c;border-radius:6px;height:30px;padding:0 10px;outline:none;width:100%}
textarea.inp{height:auto;padding:8px 10px;resize:vertical}
.inp:focus{border-color:#4a4a4a}
table.tbl{width:100%;border-collapse:collapse;font-size:12.5px}
.tbl th{text-align:left;color:var(--muted);font-weight:500;padding:7px 10px;border-bottom:1px solid var(--border);white-space:nowrap}
.tbl td{padding:8px 10px;border-bottom:1px solid var(--border-soft);white-space:nowrap}
.tbl tr:hover td{background:#191919}
.pill{display:inline-flex;align-items:center;gap:5px;height:19px;padding:0 7px;border-radius:10px;background:#262626;color:var(--text-2);font-size:11px;font-weight:500}
.pill.green{background:rgba(63,178,107,.14);color:#5fcb88}
.pill.amber{background:rgba(227,163,59,.14);color:#e9b45b}
.pill.red{background:rgba(226,85,79,.14);color:#ef7b75}
.pill.blue{background:rgba(101,138,216,.16);color:#8aa8ea}
.pill.purple{background:rgba(167,125,232,.15);color:#bb9bf0}
.dot{width:7px;height:7px;border-radius:50%;display:inline-block;background:var(--muted)}
.muted{color:var(--muted)} .t2{color:var(--text-2)}
.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:var(--muted);padding:40px 0;text-align:center}

/* coming soon */
.soon{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--muted)}
.soon .big{font-size:20px;color:var(--text);font-weight:600}
.soon .ico{width:44px;height:44px;border-radius:10px;background:var(--surface);border:1px solid var(--border);display:grid;place-items:center;font-size:20px;margin-bottom:6px}

/* overlay, modal, drawer, toast */
#overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);display:none;z-index:50;align-items:flex-start;justify-content:center;padding-top:12vh}
#overlay.show{display:flex}
.modal{background:#1c1c1c;border:1px solid #2e2e2e;border-radius:12px;width:560px;max-width:92vw;max-height:76vh;overflow:auto;box-shadow:0 20px 60px rgba(0,0,0,.6)}
.modal-h{display:flex;align-items:center;padding:14px 16px;border-bottom:1px solid var(--border)}
.modal-h h2{margin:0;font-size:14px;font-weight:600}
.modal-h .x{margin-left:auto}
.modal-b{padding:16px}
.modal-f{display:flex;justify-content:flex-end;gap:8px;padding:12px 16px;border-top:1px solid var(--border)}
.drawer{position:fixed;top:0;right:0;bottom:0;width:460px;background:#191919;border-left:1px solid #2c2c2c;z-index:60;transform:translateX(100%);transition:transform .18s ease;overflow:auto}
.drawer.show{transform:none}
#toast{position:fixed;bottom:18px;left:50%;transform:translateX(-50%) translateY(20px);background:#2a2a2a;border:1px solid #3a3a3a;padding:8px 14px;border-radius:8px;opacity:0;transition:.18s;z-index:80;pointer-events:none}
#toast.show{opacity:1;transform:translateX(-50%)}
.search-list .row{padding:8px 10px;border-radius:6px;display:flex;gap:10px;align-items:center;cursor:pointer;color:var(--text-2)}
.search-list .row:hover,.search-list .row.sel{background:#262626;color:var(--text)}
::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background:#2c2c2c;border-radius:6px}::-webkit-scrollbar-track{background:transparent}

svg.lucide{width:15px;height:15px;flex:none}
.sb-item .ic svg{width:14px;height:14px}
.sb-brand svg.mini{width:13px;height:13px;color:var(--muted)}
.sb-create svg{width:14px;height:14px}
.tb-search svg{width:13px;height:13px;transform:none}
.icon-btn svg{width:15px;height:15px}
.icon-btn{display:inline-grid;place-items:center}
.soon .ico svg{width:20px;height:20px;color:var(--text-2)}
