:root{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:#edf2fa;background:#101722;line-height:1.45;
  --bg:#101722;--sidebar:#151d29;--panel:#1a2330;--panel2:#202a38;
  --line:#334052;--muted:#8d98a8;--blue:#3f78ed;--blue2:#4c8aff;
  --green:#35c98a;--red:#ef6678;--yellow:#e5b84d
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);min-width:320px}
button,input,textarea{font:inherit}
button{cursor:pointer}
.app-shell{min-height:100vh;display:flex}
.sidebar{
  width:260px;position:fixed;inset:0 auto 0 0;background:var(--sidebar);
  border-right:1px solid #293342;padding:24px 16px 18px;display:flex;flex-direction:column;z-index:20
}
.brand{display:flex;align-items:center;gap:12px;padding:4px 8px 32px}
.brand-avatar{
  width:43px;height:43px;border-radius:50%;display:grid;place-items:center;
  background:linear-gradient(145deg,#e6edf7,#8796aa);color:#182231;font-weight:900;font-size:13px;
  box-shadow:0 5px 18px rgba(0,0,0,.2)
}
.brand b{display:block;color:#f6f8fb;font-size:15px;letter-spacing:-.02em}
.brand span{display:block;color:#8d98a8;font-size:11px;margin-top:3px}
.side-nav{display:grid;gap:5px}
.nav-label{font-size:10px;letter-spacing:.14em;color:#687588;font-weight:800;padding:0 13px 8px}
.nav-item{
  width:100%;border:1px solid transparent;background:transparent;color:#a5afbd;
  text-align:left;padding:12px 13px;border-radius:10px;display:flex;align-items:center;gap:11px;
  font-weight:650;font-size:13px;transition:.16s
}
.nav-icon{width:22px;text-align:center;font-size:17px;color:#8793a3}
.nav-item.active{background:#344052;border-color:#414e61;color:#fff;box-shadow:0 4px 14px rgba(0,0,0,.12)}
.nav-item.active .nav-icon{color:#fff}
.nav-item:hover{background:#222d3b;color:#fff}
.sidebar-bottom{margin-top:auto}
.server-card{
  border:1px solid #313d4d;background:#1b2532;border-radius:11px;padding:12px;
  display:flex;gap:10px;align-items:center;margin-bottom:11px
}
.server-card-icon{width:28px;height:28px;border-radius:8px;background:#273443;display:grid;place-items:center}
.server-card-text strong{font-size:11px;display:block;color:#f0f4f8}
.server-card-text span{font-size:10px;color:#7f8b9b;display:block;margin-top:2px;max-width:160px;overflow:hidden;text-overflow:ellipsis}
.live-dot{width:8px;height:8px;border-radius:50%;background:var(--green);display:inline-block;box-shadow:0 0 0 4px rgba(53,201,138,.10);flex:none}
.logout{
  width:100%;border:0;background:#354154;color:#f0f3f7;border-radius:10px;padding:11px;
  font-weight:750;font-size:12px
}
.logout:hover{background:#414e62}
.main-area{margin-left:260px;min-width:0;flex:1}
.topbar{
  height:78px;background:#121a25;border-bottom:1px solid #293342;padding:13px 38px;
  display:flex;align-items:center;justify-content:space-between;gap:20px
}
.breadcrumb{font-size:10px;letter-spacing:.13em;color:#7e8999;font-weight:800}
.breadcrumb span{margin:0 6px;color:#4d5969}
.topbar h1{margin:4px 0 0;font-size:20px;color:#f5f7fa}
.topbar-right{display:flex;align-items:center;gap:12px}
.top-online{display:flex;align-items:center;gap:8px;color:#9faab9;font-size:11px;font-weight:700}
.refresh-btn{
  border:1px solid #394658;background:#222c3a;color:#dce4ed;border-radius:8px;
  padding:9px 13px;font-weight:750;font-size:11px
}
.refresh-btn:hover{background:#2b3747}
.content{width:100%;max-width:1370px;margin:0 auto;padding:32px 38px 8px}
.welcome-row{
  display:flex;align-items:flex-end;justify-content:space-between;gap:25px;margin-bottom:22px
}
.section-kicker{font-size:10px;letter-spacing:.16em;font-weight:850;color:#8995a5}
.welcome-row h2{margin:6px 0 4px;font-size:26px;letter-spacing:-.03em;color:#f7f9fb}
.wave{font-size:22px}
.welcome-row p{margin:0;color:#9aa5b4;font-size:13px}
.hero-btn{min-width:125px}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px;margin-bottom:38px}
.stat-card{
  min-width:0;background:var(--panel);border:1px solid #3a4657;border-radius:15px;
  padding:19px 20px 17px;box-shadow:0 12px 28px rgba(0,0,0,.10)
}
.stat-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.stat-symbol{
  min-width:42px;height:38px;padding:0 8px;border-radius:9px;background:#303b4c;
  display:grid;place-items:center;color:#c9d3df;font-weight:850;font-size:10px;letter-spacing:.03em
}
.clock-symbol{font-size:21px}
.realtime{
  border-radius:999px;padding:5px 8px;background:#163428;color:#4fd49a;
  font-size:9px;font-weight:800;white-space:nowrap
}
.stat-name{font-size:13px;color:#9ca7b5;margin-top:12px}
.stat-value,.stat-card>strong{display:block;font-size:31px;line-height:1.05;color:#f4f7fa;margin:7px 0 13px;letter-spacing:-.035em}
.stat-value-row{display:flex;align-items:flex-end;justify-content:space-between;gap:10px}
.stat-value-row strong{font-size:31px;line-height:1.05;color:#f4f7fa;margin:7px 0 13px;letter-spacing:-.035em}
.progress{height:9px;background:#303b4a;border-radius:99px;overflow:hidden}
.progress i{display:block;height:100%;width:0;background:linear-gradient(90deg,#3f74e7,#5797ff);border-radius:99px;transition:.3s}
.stat-card small{display:block;color:#8995a4;font-size:10px;margin-top:9px}
.mini-bars{height:27px;display:flex;align-items:flex-end;gap:3px;margin-bottom:10px}
.mini-bars i{width:4px;height:13px;background:#485568;border-radius:3px}
.mini-bars i:nth-child(2){height:18px}.mini-bars i:nth-child(3){height:12px}.mini-bars i:nth-child(4){height:24px;background:#4e86ef}
.mini-bars i:nth-child(5){height:17px}.mini-bars i:nth-child(6){height:14px}.mini-bars i:nth-child(7){height:20px}
.uptime-value{font-size:25px!important;margin-top:17px!important}
.uptime-status{font-size:10px;color:#8794a4;display:flex;align-items:center;gap:8px;margin-top:23px}
.applications{padding-top:2px}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:15px}
.section-head h2{margin:5px 0 3px;font-size:24px;color:#f4f7fa;letter-spacing:-.02em}
.section-head p:not(.section-kicker){margin:0;color:#8e99a9;font-size:12px}
.toolbar-actions{display:flex;align-items:center;gap:12px}
.search-wrap{position:relative}
.search-wrap>span{position:absolute;left:13px;top:9px;color:#8793a2;font-size:17px}
.search{
  height:40px;width:255px;background:#161f2b;border:1px solid #394658;color:#edf2f8;
  border-radius:9px;padding:0 12px 0 35px;outline:none
}
.search::placeholder{color:#727e8e}
.search:focus,input:focus,textarea:focus{border-color:#4b82ed;box-shadow:0 0 0 3px rgba(70,126,235,.12)}
.btn{
  border:0;border-radius:8px;padding:10px 14px;font-weight:800;cursor:pointer;font-size:11px;
  transition:.15s;white-space:nowrap
}
.btn:hover{transform:translateY(-1px)}
.btn.primary{background:linear-gradient(135deg,#3d74e7,#4b86f2);color:#fff;box-shadow:0 7px 18px rgba(49,105,220,.18)}
.btn.secondary{background:#283445;color:#a9c9ff;border:1px solid #3c4b61}
.btn.danger{background:#3a232b;color:#ff8798}
.btn.warning{background:#3b3420;color:#f3cf70}
.btn.ghost{background:#242f3e;color:#acb8c8}
.btn.small{padding:7px 9px;font-size:10px}
.bot-panel{background:#1a2330;border:1px solid #3a4657;border-radius:14px;overflow:hidden;box-shadow:0 12px 28px rgba(0,0,0,.09)}
.bot-panel-title{padding:19px 20px 15px;color:#aab4c1;font-size:13px}
.bot-table-head{
  display:grid;grid-template-columns:2fr 1fr 1.25fr 1.25fr 1.45fr;align-items:center;
  min-height:43px;padding:0 20px;background:#313b4a;border-top:1px solid #414d5e;border-bottom:1px solid #414d5e;
  color:#d8dee7;font-size:11px;font-weight:800
}
.bot-grid{display:block}
.bot-card{
  display:grid;grid-template-columns:2fr 1fr 1.25fr 1.25fr 1.45fr;align-items:center;
  min-height:74px;padding:13px 20px;background:#1b2532;border:0;border-bottom:1px solid #303b4a;border-radius:0;
  box-shadow:none
}
.bot-card:last-child{border-bottom:0}
.bot-card:hover{background:#202b39}
.bot-head{display:block;min-width:0}
.bot-name{font-weight:800;font-size:13px;color:#edf2f7;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.entry{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#778598;font-size:10px;margin:4px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.status{
  display:inline-flex;align-items:center;gap:7px;border-radius:999px;padding:6px 9px;
  font-size:9px;font-weight:900;white-space:nowrap
}
.status.running{background:#14392d;color:#54d49c}
.status.stopped{background:#2a3340;color:#929eae}
.dot{width:6px;height:6px;border-radius:50%;background:currentColor}
.bot-card>.metrics{display:contents}
.metric{display:flex;align-items:center;gap:5px;background:none;border:0;padding:0}
.metric b{display:inline;color:#dce4ee;font-size:11px;font-weight:750}
.metric span{font-size:9px;color:#768497}
.metric:first-child{display:none}
.actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-start}
.empty{padding:46px 20px;text-align:center;background:#1a2330}
.empty-icon{margin:auto;width:48px;height:48px;border-radius:14px;background:#273548;color:#6ea1ff;display:grid;place-items:center;font-size:21px}
.empty h3{color:#e4eaf2;margin:13px 0 3px}.empty p{color:#7f8c9e;font-size:12px;margin:0 0 15px}
.hidden{display:none!important}
.muted{color:#7e8b9c}
footer{color:#5e6b7c;font-size:10px;padding:25px 0 30px;margin-top:20px}
footer span{margin:0 5px}
.login-page{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 20% 20%,#1b3153 0,#101722 38%),#101722;position:relative;overflow:hidden}
.login-glow{position:absolute;border-radius:50%;filter:blur(80px);opacity:.22}.glow-one{width:280px;height:280px;background:#3d7cf4;left:-80px;top:-70px}.glow-two{width:300px;height:300px;background:#2dd69b;right:-100px;bottom:-120px}
.login-card{position:relative;width:min(430px,100%);background:#1a2330;border:1px solid #3a4657;border-radius:20px;padding:30px;box-shadow:0 25px 80px rgba(0,0,0,.35)}
.login-title{margin-top:32px}.login-title>span{font-size:10px;letter-spacing:.16em;color:#719ef0;font-weight:900}.login-title h1{color:#fff;font-size:24px;margin:6px 0}.login-title p{color:#8a96a7;font-size:12px;margin:0}
.stack{display:grid;gap:14px;margin-top:23px}
label{font-size:11px;font-weight:800;color:#aab5c4}
input,textarea{font:inherit;width:100%;margin-top:7px;border:1px solid #3a4657;border-radius:9px;padding:10px 12px;outline:none;background:#121b27;color:#e8eef7}
input::placeholder,textarea::placeholder{color:#5f6d7e}
textarea{resize:vertical;min-height:180px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px}
.login-btn{height:43px;margin-top:4px;display:flex;align-items:center;justify-content:center;gap:10px}
.alert{padding:10px 12px;border-radius:9px;margin-top:16px;font-size:12px}.danger{background:#3a232b;color:#ff8798}.login-foot{text-align:center;color:#5b6879;font-size:9px;margin-top:19px}
.modal{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:18px}
.modal-backdrop{position:absolute;inset:0;background:rgba(4,8,14,.78);backdrop-filter:blur(3px)}
.modal-card{position:relative;background:#1a2330;border:1px solid #3b4759;color:#e8eef9;border-radius:17px;width:min(560px,100%);max-height:90vh;overflow:auto;padding:24px;z-index:1;box-shadow:0 30px 90px rgba(0,0,0,.45)}
.modal-card.wide{width:min(900px,100%)}
.modal-close{position:absolute;right:15px;top:10px;border:0;background:transparent;font-size:27px;color:#788597;cursor:pointer}
.modal-title{margin:0 0 4px;font-size:20px;color:#fff}.modal-subtitle{margin:0 0 18px;color:#8591a1;font-size:12px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.full-col{grid-column:1/-1}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
.tabs{display:flex;gap:4px;border-bottom:1px solid #354154;margin-bottom:15px}.tab{border:0;background:none;padding:9px 11px;cursor:pointer;color:#7f8b9d;font-weight:800;font-size:11px}.tab.active{color:#75a4ff;border-bottom:2px solid #4b84ed}
.tab-pane{display:none}.tab-pane.active{display:block}
.logs{background:#0d141e;color:#c9d5e5;border:1px solid #2c394a;border-radius:10px;padding:15px;height:400px;overflow:auto;font:11px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap}
.notice{padding:11px 13px;background:#192b42;border:1px solid #2c4a70;border-radius:9px;color:#8cb0e4;font-size:11px;margin-bottom:12px}
.kv{display:grid;grid-template-columns:150px 1fr;gap:9px;font-size:12px}.kv b{color:#77869a}
hr{border:0;border-top:1px solid #354154;margin:20px 0}
@media(max-width:1150px){
  .sidebar{width:225px}.main-area{margin-left:225px}.content{padding-left:28px;padding-right:28px}
  .stats-grid{grid-template-columns:repeat(2,1fr)}
  .bot-table-head,.bot-card{grid-template-columns:1.8fr 1fr 1.2fr 1.1fr 1.3fr}
}
@media(max-width:800px){
  .sidebar{position:static;width:100%;height:auto;padding:13px 16px}.app-shell{display:block}.side-nav{display:none}
  .sidebar-bottom{display:none}.brand{padding:0}.main-area{margin-left:0}
  .topbar{padding:13px 18px}.topbar-right{display:none}.content{padding:22px 17px}
  .welcome-row,.section-head{align-items:stretch;flex-direction:column}.hero-btn{align-self:flex-start}
  .toolbar-actions{width:100%}.search-wrap{flex:1}.search{width:100%}
  .stats-grid{grid-template-columns:1fr;gap:14px}
  .bot-table-head{display:none}
  .bot-card{grid-template-columns:1fr 1fr;gap:11px;padding:16px}
  .bot-card .bot-head{grid-column:1/-1}.bot-card .actions{grid-column:1/-1}
  footer{padding:20px 0}
  .form-grid{grid-template-columns:1fr}.full-col{grid-column:auto}
}
@media(min-width:1500px){.content{padding-left:48px;padding-right:48px}}

.last-active{font-size:10px;color:#8a96a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.db-list{display:flex;flex-direction:column;gap:8px}.db-choice{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid #334155;border-radius:10px;background:#101927;cursor:pointer}.db-choice:hover{border-color:#64748b}.db-choice.selected{border-color:#60a5fa;box-shadow:0 0 0 1px #60a5fa inset}.db-choice>span{font-size:12px;font-weight:700;padding:5px 9px;border-radius:999px;background:#1e293b}.db-choice.selected>span{background:#2563eb;color:#fff}.muted{color:#94a3b8;font-size:12px}
