
:root {
  --bg:#080b14;
  --surface:#101727;
  --surface-2:#151f32;
  --surface-3:#1b2940;
  --border:#26364d;
  --text:#f8fafc;
  --muted:#94a3b8;
  --purple:#8b5cf6;
  --blue:#38bdf8;
  --cyan:#14f1d9;
  --green:#22c55e;
  --red:#ef4444;
  --orange:#f59e0b;
  --gradient:linear-gradient(120deg,#8b5cf6,#38bdf8,#14f1d9);
  --radius:18px;
  font-family:Inter,system-ui,sans-serif;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(ellipse at 10% 0%,#38236a33,transparent 35%),
    radial-gradient(ellipse at 90% 20%,#07598522,transparent 35%),
    var(--bg);
  color:var(--text);
  font-size:14px;
}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{
  outline:2px solid var(--cyan);
  outline-offset:3px;
}
.hidden{display:none!important}
.muted{color:var(--muted)}
.eyebrow{
  color:var(--cyan);
  font-size:10px;
  font-weight:800;
  letter-spacing:2px;
}
h1,h2,h3,p{margin-top:0}
h1{font-size:clamp(25px,4vw,34px);letter-spacing:-1px}
h2{font-size:18px}
small{color:var(--muted)}
.glass{
  background:linear-gradient(145deg,#151f32e8,#0e1626ed);
  border:1px solid var(--border);
  box-shadow:0 15px 45px #0003;
  backdrop-filter:blur(18px);
  border-radius:var(--radius);
}
.primary-btn,.secondary-btn,.danger-btn,.google-btn{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:11px 17px;
  border-radius:11px;
  font-weight:700;
  border:1px solid transparent;
  transition:.2s ease;
}
.primary-btn{
  color:white;
  background:var(--gradient);
  box-shadow:0 5px 20px #8b5cf633;
}
.primary-btn:hover{filter:brightness(1.12);transform:translateY(-1px)}
.secondary-btn{
  color:var(--text);
  background:var(--surface-3);
  border-color:var(--border);
}
.secondary-btn:hover{border-color:var(--blue)}
.danger-btn{
  background:#ef44441a;
  border-color:#ef444455;
  color:#fca5a5;
}
.google-btn{
  width:100%;
  background:#fff;
  color:#202124;
  border-color:#ddd;
}
.google-icon{font-size:19px;font-weight:900;color:#4285f4}
.full-btn{width:100%;margin-top:17px}
.text-btn{
  border:0;
  background:none;
  color:var(--cyan);
  padding:8px 0;
  font-size:12px;
  font-weight:700;
}
.icon-btn{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  color:var(--text);
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:11px;
  font-size:17px;
}

/* AUTH */
.auth-screen{
  min-height:100vh;
  display:grid;
  grid-template-columns:1fr minmax(330px,470px);
  align-items:center;
  gap:7vw;
  max-width:1200px;
  padding:55px 7%;
  margin:auto;
}
.auth-brand{text-align:center}
.brand-logo{width:75px;height:75px}
.auth-brand h1{font-size:55px;margin:15px 0 5px}
.auth-brand h1 span{
  background:var(--gradient);
  color:transparent;
  background-clip:text;
}
.auth-brand>p{font-size:11px;letter-spacing:3px;color:var(--muted)}
.auth-decoration{
  height:260px;
  display:grid;
  place-items:center;
  position:relative;
}
.orbit{
  position:absolute;
  border:1px solid #8b5cf655;
  border-radius:50%;
  transform:rotate(-25deg);
}
.orbit-one{width:220px;height:95px}
.orbit-two{width:270px;height:125px;transform:rotate(40deg);border-color:#14f1d955}
.orbit-core{
  display:grid;
  place-items:center;
  width:95px;height:95px;
  border-radius:28px;
  background:var(--gradient);
  box-shadow:0 0 65px #8b5cf655;
  font-size:45px;font-weight:900;
}
.auth-panel{padding:35px}
.auth-heading h2{font-size:27px;margin:13px 0 7px}
.auth-heading p{color:var(--muted)}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:25px 0}
.auth-tab{
  padding:12px;
  background:var(--surface-2);
  border:1px solid var(--border);
  color:var(--muted);
  border-radius:10px;
}
.auth-tab.active{
  background:#8b5cf622;
  border-color:var(--purple);
  color:white;
}
form label{
  display:block;
  color:#dbe4f0;
  font-size:12px;
  font-weight:600;
  margin:14px 0 7px;
}
input,textarea,select{
  width:100%;
  padding:12px 13px;
  background:#080f1d;
  color:var(--text);
  border:1px solid var(--border);
  border-radius:10px;
  outline:none;
}
input:focus,textarea:focus,select:focus{border-color:var(--purple)}
input::placeholder,textarea::placeholder{color:#64748b}
textarea{min-height:100px;resize:vertical}
.check-label{
  display:flex;
  align-items:center;
  gap:9px;
  color:var(--muted);
}
.check-label input{width:auto}
.auth-divider{
  display:flex;
  align-items:center;
  gap:12px;
  margin:23px 0;
  color:var(--muted);
  font-size:10px;
  letter-spacing:1px;
}
.auth-divider:before,.auth-divider:after{
  content:"";height:1px;background:var(--border);flex:1;
}
.auth-footer{text-align:center;color:var(--muted);font-size:10px;margin:20px 0 0}

/* APP LAYOUT */
.app-shell{min-height:100vh}
.sidebar{
  position:fixed;
  inset:0 auto 0 0;
  width:250px;
  z-index:20;
  padding:22px 15px;
  background:#0c1321f5;
  border-right:1px solid var(--border);
  display:flex;
  flex-direction:column;
  overflow-y:auto;
}
.sidebar-brand{display:flex;align-items:center;gap:11px;padding:0 8px 27px}
.sidebar-brand img{width:39px;height:39px}
.sidebar-brand b{display:block;font-size:17px}
.sidebar-brand small{font-size:9px;letter-spacing:1px}
.workspace-label{
  color:#64748b;
  font-size:9px;
  font-weight:800;
  letter-spacing:1.6px;
  padding:13px 10px 8px;
}
.sidebar nav{display:grid;gap:4px}
.nav-item{
  text-align:left;
  display:flex;
  align-items:center;
  gap:12px;
  padding:11px 12px;
  border:1px solid transparent;
  background:transparent;
  color:var(--muted);
  border-radius:10px;
  font-size:12px;
  font-weight:600;
}
.nav-item span{width:20px;text-align:center}
.nav-item:hover,.nav-item.active{
  color:white;
  background:#8b5cf61c;
  border-color:#8b5cf644;
}
.nav-item.active{box-shadow:inset 3px 0 var(--purple)}
.sidebar-bottom{margin-top:auto;padding-top:20px}
.user-card{
  display:flex;align-items:center;gap:9px;
  padding:11px;
  border:1px solid var(--border);
  background:var(--surface);
  border-radius:12px;
}
.avatar,.top-avatar{
  display:grid;place-items:center;
  width:35px;height:35px;
  border-radius:11px;
  background:var(--gradient);
  color:white;font-weight:800;
}
.user-card-info{min-width:0;flex:1}
.user-card-info b,.user-card-info small{
  display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.user-card-info b{font-size:11px}
.user-card-info small{font-size:9px}
.user-card .icon-btn{width:30px;height:30px}
.main-area{margin-left:250px;min-height:100vh}
.topbar{
  height:68px;
  position:sticky;top:0;z-index:10;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 30px;
  background:#080b14d9;
  border-bottom:1px solid var(--border);
  backdrop-filter:blur(18px);
}
.topbar-left,.topbar-right{display:flex;align-items:center;gap:12px}
.breadcrumb{color:var(--muted);font-size:12px}
.breadcrumb b{color:white}
.top-avatar{border:0;cursor:pointer}
.page-container{max-width:1500px;margin:auto;padding:30px}
.page{display:none;animation:appear .25s ease}
.page.active{display:block}
@keyframes appear{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.page-heading{
  display:flex;align-items:center;justify-content:space-between;
  gap:20px;margin-bottom:27px;
}
.page-heading h1{margin:8px 0}
.page-heading p{color:var(--muted);margin:0}

/* DASHBOARD */
.stats-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:15px;margin-bottom:20px;
}
.stat-card{padding:20px;min-width:0}
.stat-card>span{display:block;font-size:22px;margin-bottom:17px}
.stat-card small,.stat-card strong,.stat-card em{display:block}
.stat-card strong{font-size:25px;margin:8px 0}
.stat-card em{font-size:10px;color:var(--muted);font-style:normal}
.content-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:18px;margin-bottom:18px}
.panel{padding:22px;margin-bottom:18px}
.panel-heading{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;margin-bottom:17px;
}
.panel-heading h2{margin:0 0 5px}
.panel-heading p{color:var(--muted);font-size:11px;margin:0}
.quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.quick-actions button{
  padding:14px 10px;text-align:left;
  border:1px solid var(--border);
  border-radius:10px;background:var(--surface-2);color:var(--text);
}
.quick-actions button:hover{border-color:var(--cyan)}
.compact-bot,.activity-row{
  display:flex;align-items:center;gap:12px;
  padding:12px 0;border-bottom:1px solid var(--border);
}
.compact-bot:last-child,.activity-row:last-child{border:0}
.bot-symbol{font-size:22px}
.compact-bot-info{flex:1}
.compact-bot-info b,.compact-bot-info small{display:block}
.compact-bot-info b{font-size:12px}
.compact-bot-info small{font-size:10px}
.status{
  font-size:9px;padding:5px 8px;border-radius:20px;
  background:#64748b22;color:var(--muted);
}
.status.running{background:#22c55e20;color:#4ade80}
.status.stopped{background:#ef444420;color:#fca5a5}
.activity-icon{color:var(--cyan);font-size:18px}
.activity-text{flex:1;font-size:12px}
.activity-text small{display:block;margin-top:4px}
.activity-time{font-size:10px;color:var(--muted)}

/* BOT CARDS */
.toolbar{display:flex;gap:10px;margin-bottom:18px}
.toolbar input{flex:1}
.toolbar select{max-width:190px}
.bots-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.bot-card{padding:20px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius)}
.bot-card-top{display:flex;align-items:center;gap:12px}
.bot-card-top>div:nth-child(2){flex:1}
.bot-card-top h3{margin:0 0 4px;font-size:14px}
.bot-meta{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin:20px 0}
.bot-meta span,.bot-meta b{display:block}
.bot-meta span{color:var(--muted);font-size:10px;margin-bottom:5px}
.bot-meta b{font-size:11px;overflow-wrap:anywhere}
.bot-actions{display:flex;flex-wrap:wrap;gap:7px}
.bot-actions button{font-size:10px;padding:9px 12px;min-height:35px}

/* FORMS */
.form-panel{max-width:700px}
.form-panel h2{margin-bottom:23px}
.form-panel .primary-btn{margin-top:18px}
.form-panel textarea{margin-top:5px}
.profile-panel{max-width:700px}
.profile-heading{display:flex;align-items:center;gap:18px;margin-bottom:25px}
.profile-heading img{width:75px;height:75px;border-radius:22px;background:var(--surface-2)}
.profile-heading h2{margin:0 0 5px}
.profile-heading p{margin:0;color:var(--muted)}
#profile-form .primary-btn{margin-top:20px}

/* TERMINAL */
.terminal-window{
  background:#050912;border:1px solid #26364d;
  border-radius:15px;overflow:hidden;
}
.terminal-header{
  padding:13px 17px;background:#111a2b;
  display:flex;justify-content:space-between;align-items:center;
}
.terminal-header span{color:#22c55e;letter-spacing:3px}
.terminal-header b{font-size:10px;letter-spacing:1px}
.terminal-header button{background:none;border:0;color:var(--muted)}
.terminal-output{
  min-height:280px;max-height:440px;overflow:auto;
  padding:20px;color:#a5f3c5;
  font-family:monospace;white-space:pre-wrap;
}
.terminal-output p{margin:0 0 10px}
#terminal-form{
  display:flex;align-items:center;gap:10px;
  padding:14px;border-top:1px solid var(--border);
  font-family:monospace;color:var(--cyan);
}
#terminal-form input{
  border:0;background:transparent;font-family:monospace;
}

/* DEVELOPER */
.code-editor{
  min-height:300px;background:#050912;
  color:#a5f3c5;font-family:monospace;
  line-height:1.7;tab-size:2;
}
.code-result{
  min-height:50px;padding:15px;
  background:#080f1d;color:#a5f3c5;
  border-radius:10px;white-space:pre-wrap;
  font-family:monospace;
}

/* COMMUNITY AND CHAT */
.community-post{
  padding:20px;margin-bottom:14px;
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);
}
.post-author{display:flex;align-items:center;gap:10px}
.post-author b,.post-author small{display:block}
.post-author small{margin-top:4px}
.community-post p{margin:17px 0 0;line-height:1.7;overflow-wrap:anywhere}
#post-form .primary-btn{margin-top:12px}
.chat-messages{
  display:flex;flex-direction:column;gap:12px;
  min-height:260px;max-height:450px;overflow:auto;
  padding:10px 0 20px;
}
.chat-message{
  align-self:flex-start;max-width:80%;
  padding:12px 15px;border-radius:14px;
  background:var(--surface-3);overflow-wrap:anywhere;
}
.chat-message.mine{align-self:flex-end;background:#5736a6}
.chat-message small{display:block;margin-top:7px;font-size:9px}
.chat-form{display:flex;gap:9px;border-top:1px solid var(--border);padding-top:15px}
.chat-form input{flex:1}

/* NOTIFICATIONS / SETTINGS / PLANS */
.notification-item{
  display:flex;align-items:center;gap:14px;
  padding:16px 0;border-bottom:1px solid var(--border);
}
.notification-item:last-child{border:0}
.notification-item>div:nth-child(2){flex:1}
.notification-item p{margin:5px 0;font-size:11px;color:var(--muted)}
.setting-row{
  display:flex!important;align-items:center;justify-content:space-between;
  gap:15px;padding:15px 0;border-bottom:1px solid var(--border);
}
.setting-row input[type=checkbox]{width:19px;height:19px;accent-color:var(--purple)}
.setting-row select{max-width:160px}
.settings-panel>button{margin:12px 7px 0 0}
.plan-card h3{font-size:23px;color:var(--cyan)}
.plan-card p{color:var(--muted);line-height:1.6}
.plan-card.featured{border-color:var(--purple);box-shadow:0 0 30px #8b5cf622}
.about-panel{text-align:center;padding:45px}
.about-panel img{width:90px}
.about-panel p{color:var(--muted);line-height:1.8}

/* MODAL AND TOAST */
#toast-container{
  position:fixed;top:18px;right:18px;z-index:1000;
  display:grid;gap:9px;
}
.toast{
  max-width:min(350px,90vw);
  background:#172238;border:1px solid var(--border);
  padding:13px 17px;border-radius:12px;
  box-shadow:0 10px 35px #0007;
  animation:appear .2s ease;
}
.modal-backdrop{
  position:fixed;inset:0;z-index:1001;
  display:grid;place-items:center;padding:20px;
  background:#000a;backdrop-filter:blur(7px);
}
.modal-card{
  width:min(430px,100%);
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:18px;padding:25px;
  box-shadow:0 25px 80px #0008;
}
.modal-card h2{margin-bottom:12px}
.modal-card p{line-height:1.7}
.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:22px}

/* MOBILE */
.mobile-only,.mobile-nav{display:none}

@media(max-width:1000px){
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .content-grid{grid-template-columns:1fr}
}

@media(max-width:760px){
  .auth-screen{
    grid-template-columns:1fr;
    gap:15px;padding:30px 17px;
  }
  .auth-brand h1{font-size:38px}
  .auth-decoration{height:125px}
  .orbit-one{width:150px;height:65px}
  .orbit-two{width:185px;height:85px}
  .orbit-core{width:62px;height:62px;border-radius:18px;font-size:30px}
  .auth-panel{padding:23px}
  .sidebar{
    transform:translateX(-105%);
    transition:transform .25s ease;
    width:270px;
    box-shadow:15px 0 50px #0008;
  }
  .sidebar.open{transform:translateX(0)}
  .mobile-only{display:grid}
  .main-area{margin-left:0}
  .topbar{height:60px;padding:0 14px}
  .page-container{padding:22px 15px 100px}
  .page-heading{align-items:flex-start;flex-direction:column}
  .page-heading>.primary-btn{align-self:stretch}
  .bots-grid{grid-template-columns:1fr}
  .mobile-nav{
    position:fixed;display:flex;justify-content:space-around;
    inset:auto 0 0;z-index:30;
    padding:8px 5px calc(8px + env(safe-area-inset-bottom));
    background:#0c1321f5;border-top:1px solid var(--border);
    backdrop-filter:blur(15px);
  }
  .mobile-nav button{
    display:grid;gap:4px;justify-items:center;
    border:0;background:none;color:var(--muted);
    font-size:9px;padding:5px 8px;
  }
  .mobile-nav button span{font-size:18px}
  .mobile-nav button.active{color:var(--cyan)}
  .toolbar{flex-wrap:wrap}
  .toolbar select{max-width:none}
  .activity-time{display:none}
}

@media(max-width:420px){
  .stats-grid{gap:9px}
  .stat-card{padding:14px}
  .stat-card strong{font-size:20px}
  .panel{padding:16px}
  .quick-actions{grid-template-columns:1fr}
  .auth-panel{padding:19px}
}

body.light-mode{
  --bg:#eef2ff;
  --surface:#fff;
  --surface-2:#f1f5f9;
  --surface-3:#e2e8f0;
  --border:#cbd5e1;
  --text:#172033;
  --muted:#64748b;
  background:#eef2ff;
  color:var(--text);
}
body.light-mode .sidebar,
body.light-mode .topbar{background:#ffffffed}
body.light-mode .glass{background:#ffffffed}
body.light-mode input,
body.light-mode textarea,
body.light-mode select{background:#f8fafc;color:#172033}
body.light-mode .nav-item{color:#475569}
body.light-mode .nav-item.active{color:#5b21b6}
body.compact-mode .panel{padding:13px}
body.compact-mode .page-container{padding-top:18px}
  
