:root{
  --bg:#030a16;--bg2:#061327;--panel:#07172b;--panel2:#0b213d;--panel3:#0d2b4f;
  --line:#153c67;--line-bright:#1d71b7;--text:#f7fbff;--muted:#98b5d1;
  --cyan:#16e6ff;--blue:#1677ff;--blue2:#0450f3;--green:#43e6a4;--red:#ff6f87;--gold:#ffd36d;
  --shadow:0 18px 55px rgba(0,0,0,.38);--glow:0 0 28px rgba(22,230,255,.12)
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:"Segoe UI Variable","Segoe UI",Inter,Arial,sans-serif;color:var(--text);min-height:100vh;background:
radial-gradient(circle at 50% -15%,rgba(18,110,255,.32),transparent 36%),
radial-gradient(circle at 8% 22%,rgba(0,229,255,.12),transparent 25%),
linear-gradient(180deg,#06162b 0,#030a16 45%,#020711 100%);background-attachment:fixed}body:before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.26;background-image:linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px);background-size:34px 34px;mask-image:linear-gradient(to bottom,#000,transparent 72%)}a{color:inherit;text-decoration:none}code{font-family:Consolas,monospace;background:#061426;border:1px solid var(--line);padding:2px 6px;border-radius:6px;color:#8eeeff}.wrap{max-width:1180px;margin:auto;padding:28px 24px;position:relative}.nav{display:flex;align-items:center;justify-content:space-between;padding:11px 24px;border-bottom:1px solid rgba(50,125,190,.28);background:rgba(2,11,24,.88);position:sticky;top:0;z-index:30;backdrop-filter:blur(18px);box-shadow:0 10px 35px rgba(0,0,0,.22)}.brand{display:flex;align-items:center;gap:7px;min-width:210px}.brand img{display:block;width:190px;height:54px;object-fit:contain;object-position:left center}.brand small{font-size:10px;font-weight:900;background:linear-gradient(180deg,#12375d,#0a2543);border:1px solid #245c91;padding:4px 7px;border-radius:99px;color:#a9dcff;box-shadow:inset 0 0 12px #0a86ff22}.navlinks{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.nav form{margin:0}.btn,button{border:1px solid #2189d8;border-radius:11px;padding:11px 16px;font-weight:850;cursor:pointer;background:linear-gradient(180deg,#22b7ff 0,#0b68f3 58%,#084bd7 100%);color:white;font-size:14px;box-shadow:inset 0 1px 0 rgba(255,255,255,.32),0 8px 24px rgba(0,105,255,.15);transition:transform .16s ease,filter .16s ease,box-shadow .16s ease}.btn:hover,button:hover{filter:brightness(1.08);transform:translateY(-1px);box-shadow:inset 0 1px 0 rgba(255,255,255,.36),0 10px 28px rgba(0,142,255,.24)}.btn.secondary,button.secondary{background:linear-gradient(180deg,#163254,#0b1e36);border-color:#234d78;box-shadow:none}.btn.danger,button.danger{background:linear-gradient(180deg,#7b2b43,#4d1528);border-color:#9d3c59}.btn.ghost{border:1px solid #173d66;background:rgba(6,23,42,.55);box-shadow:none}.wide{width:100%}.hero{padding:54px 0 42px;text-align:center}.branded-hero{padding-top:30px}.hero-logo{display:block;width:min(760px,88vw);height:auto;margin:0 auto -8px;filter:drop-shadow(0 20px 42px rgba(0,86,255,.18))}.eyebrow{display:inline-flex;align-items:center;gap:7px;color:#81ddff;font-size:12px;font-weight:900;letter-spacing:.18em;text-transform:uppercase;margin-bottom:9px}.eyebrow:before{content:"";width:22px;height:2px;border-radius:2px;background:linear-gradient(90deg,var(--cyan),var(--blue))}.hero h1{font-size:50px;line-height:1.03;margin:10px auto 16px;max-width:850px;letter-spacing:-.035em;text-shadow:0 0 30px rgba(0,151,255,.08)}.hero p{color:var(--muted);font-size:18px;line-height:1.65;max-width:780px;margin:0 auto 26px}.hero-btn{min-width:165px}.grid{display:grid;gap:18px}.plans{grid-template-columns:repeat(3,1fr)}.home-features{grid-template-columns:repeat(3,1fr)}.card{background:linear-gradient(180deg,rgba(13,39,70,.96),rgba(5,19,36,.98));border:1px solid #173e68;border-radius:18px;padding:22px;box-shadow:var(--shadow),var(--glow);position:relative;overflow:hidden}.card:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(120deg,rgba(255,255,255,.045),transparent 22%);opacity:.9}.card>*{position:relative;z-index:1}.card h3{margin-top:0}.plan-card{position:relative;overflow:hidden}.plan-card:before{content:"";position:absolute;inset:0 0 auto 0;height:3px;background:linear-gradient(90deg,transparent,var(--cyan),var(--blue),transparent);box-shadow:0 0 18px rgba(0,205,255,.4)}.plan-card:hover{border-color:#2369a2;transform:translateY(-2px)}.plan-kicker{font-size:19px;font-weight:900;margin-bottom:14px}.price{font-size:39px;font-weight:950;letter-spacing:-.035em}.small-price{font-size:31px}.price-sub{font-size:14px;letter-spacing:0}.feature{padding:7px 0;color:#d6eaff}.muted{color:var(--muted)}.pill{display:inline-block;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:950;letter-spacing:.04em;background:#142c48;border:1px solid #244c74}.pill.active{background:#103d35;color:#79f4c0;border-color:#1d8067;box-shadow:0 0 18px #1bdc8f12}.pill.off{background:#401b29;color:#ffa0b2;border-color:#7b3047}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.between{justify-content:space-between}.center{justify-content:center}.center-text{text-align:center}.form-card{max-width:520px;margin:38px auto}.billing-card{max-width:760px}.billing-summary{padding:28px}.billing-plan{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.field{display:flex;flex-direction:column;gap:7px;margin:14px 0}.field label{font-weight:750}.field input,.field select,.flex-input,select{background:#041224;border:1px solid #173f69;border-radius:11px;padding:13px;color:white;outline:none}.field input:focus,.flex-input:focus,select:focus{border-color:#20a7ff;box-shadow:0 0 0 3px rgba(21,149,255,.15)}.flex-input{flex:1;min-width:220px}.check{display:flex;gap:9px;align-items:flex-start;margin:18px 0;color:var(--muted);font-size:14px}.check input{margin-top:3px}.textlink{color:#65d8ff;text-decoration:underline;text-underline-offset:2px}.alert{padding:13px 15px;border:1px solid #2e6392;background:#0d2948;border-radius:11px;margin:16px 0;overflow-wrap:anywhere}.alert.error{border-color:#7b4052;background:#3b1621}.alert.warning{border-color:#735a2e;background:#32240f}.dash{display:grid;grid-template-columns:230px 1fr;gap:22px;padding-top:18px}.side{position:sticky;top:90px;height:max-content}.side-logo{display:block;width:160px;margin:0 auto 16px}.side a{display:block;padding:11px 12px;border-radius:9px;color:var(--muted);margin:4px 0}.side a:hover,.side .active-link{background:linear-gradient(90deg,#0d2a4b,#0a1f38);color:white;border:1px solid #174b78}.stats{grid-template-columns:repeat(4,1fr)}.customer-stats{grid-template-columns:repeat(5,1fr)}.stat strong{font-size:30px;display:block;margin-top:6px}.stat .stat-text{font-size:20px;line-height:1.25}.bot{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;border-top:1px solid #133659;padding:16px 0}.bot:first-of-type{border-top:0}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th,.table td{text-align:left;padding:12px;border-bottom:1px solid #153657;font-size:14px;white-space:nowrap}.table th{color:#8fc8eb;font-size:12px;text-transform:uppercase;letter-spacing:.06em}.footer{color:var(--muted);text-align:center;padding:38px 20px 44px;border-top:1px solid #102b48;margin-top:50px;background:rgba(1,7,15,.55)}.footer-logo{width:190px;height:auto;opacity:.82}.footerlinks{display:flex;justify-content:center;gap:16px;margin:8px 0 12px}.footerlinks a:hover{color:white}.tiny{font-size:12px}.status-dot{width:9px;height:9px;border-radius:50%;display:inline-block;margin-right:6px;background:var(--red);box-shadow:0 0 8px currentColor}.status-dot.on{background:var(--green)}.setup-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:16px}.setup-grid>div{background:#041326;border:1px solid #163c63;padding:12px;border-radius:10px}.setup-grid strong{float:right}.callout{margin-top:22px}.setting-row{display:flex;justify-content:space-between;align-items:center;gap:16px}.legal{max-width:860px;margin:38px auto;line-height:1.7}.legal h2{margin-top:28px}.page-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:22px;margin:24px 0}.page-heading.compact{max-width:760px;margin-left:auto;margin-right:auto}.page-heading h1,.dashboard-head h1{margin:3px 0 5px}.stripe-ready{display:flex;min-width:330px;align-items:center;justify-content:space-between;gap:20px;padding:16px 18px}.dashboard-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.auth-shell{display:grid;grid-template-columns:1fr 520px;align-items:center;gap:50px;min-height:650px;padding:20px 0}.auth-brand{text-align:center}.auth-brand img{width:min(520px,90%);filter:drop-shadow(0 20px 45px rgba(0,83,255,.18))}.auth-brand h1{font-size:42px;margin:2px 0 8px}.auth-card{margin:0;max-width:none}.empty-state{text-align:center;padding:34px 12px}.empty-icon{width:52px;height:52px;margin:0 auto 12px;border-radius:15px;display:grid;place-items:center;font-size:28px;background:linear-gradient(180deg,#153d64,#0b223e);border:1px solid #276293;color:#67dbff}.activity-line{display:grid;grid-template-columns:170px 1fr;gap:12px;color:#cfe4f6;font-size:13px;padding:8px 0;border-bottom:1px solid #102f4f}.activity-line:last-child{border-bottom:0}.activity-line span{color:#789bb9}.handoff-page{display:grid;place-items:center;min-height:100vh}.handoff-wrap{width:min(540px,calc(100% - 32px))}.handoff-card{background:linear-gradient(180deg,#0d2848,#06162a);border:1px solid #1b5687;border-radius:22px;padding:34px;text-align:center;box-shadow:0 25px 70px #0008,0 0 45px rgba(0,185,255,.08)}.handoff-logo{width:min(360px,90%)}.spinner{width:42px;height:42px;margin:18px auto;border-radius:50%;border:4px solid #123a60;border-top-color:#20e5ff;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.mt{margin-top:18px}.mt-small{margin-top:8px}.mb{margin-bottom:18px}.no-bottom{margin-bottom:5px}
@media(max-width:920px){.plans,.stats,.customer-stats,.home-features{grid-template-columns:1fr 1fr}.dash{grid-template-columns:1fr}.side{position:static}.auth-shell{grid-template-columns:1fr;gap:10px;min-height:auto}.auth-brand img{width:min(440px,85%)}.auth-brand h1{font-size:34px}.page-heading{align-items:stretch;flex-direction:column}.stripe-ready{min-width:0;width:100%}.nav{align-items:center;gap:10px}.brand{min-width:150px}.brand img{width:160px}.setup-grid{grid-template-columns:1fr}.bot{grid-template-columns:1fr}}
@media(max-width:620px){.wrap{padding:18px 15px}.nav{padding:10px 14px;align-items:flex-start}.brand img{width:135px;height:45px}.brand small{display:none}.navlinks{justify-content:flex-end}.navlinks .btn,.navlinks button{padding:8px 10px;font-size:12px}.plans,.stats,.customer-stats,.home-features{grid-template-columns:1fr}.hero{padding-top:25px}.hero-logo{width:96vw;margin-left:calc(50% - 48vw)}.hero h1{font-size:36px}.hero p{font-size:16px}.price{font-size:35px}.table th,.table td{padding:9px}.activity-line{grid-template-columns:1fr;gap:2px}.billing-plan{flex-direction:column}.auth-shell{padding-top:0}.auth-brand h1{font-size:30px}}

.plan-card .btn{display:inline-block}

/* Saved / inactive bot controls */
button:disabled,
.btn:disabled {
  background: #223248 !important;
  color: #71849a !important;
  border-color: #33475f !important;
  box-shadow: none !important;
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  transform: none !important;
  pointer-events: none !important;
}

button.secondary:disabled {
  background: #1b2b3e !important;
  color: #71849a !important;
  border-color: #33475f !important;
}


/* Bot dashboard name editor */
.bot-name-edit {
  position: relative;
}

.bot-name-edit > summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid #3a526b;
  border-radius: 7px;
  padding: 9px 15px;
  background: #182b3d;
  color: #dce9f5;
  font-weight: 700;
  user-select: none;
}

.bot-name-edit > summary::-webkit-details-marker {
  display: none;
}

.bot-name-edit > summary:hover {
  filter: brightness(1.12);
}

.bot-name-edit[open] {
  width: 100%;
  flex-basis: 100%;
}

.bot-name-edit-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #29435d;
  border-radius: 9px;
  background: #101f2d;
}

.bot-name-edit-form label {
  flex: 1;
}

.bot-name-edit-form input {
  width: 100%;
  margin-top: 5px;
}

/* Keep Edit as a normal action button */
.bot-name-edit {
  width: auto;
  flex: 0 0 auto;
}

.bot-name-edit > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 72px;
}

.bot-name-edit[open] {
  width: 100%;
  flex-basis: 100%;
}

.bot-name-edit[open] > summary {
  width: auto;
}

/* Keep Edit as a normal action button */
.bot-name-edit {
  width: auto;
  flex: 0 0 auto;
}

.bot-name-edit > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 72px;
}

.bot-name-edit[open] {
  width: 100%;
  flex-basis: 100%;
}

.bot-name-edit[open] > summary {
  width: auto;
}

/* Final bot Edit button layout */
.bot .row {
  flex-wrap: nowrap;
}

.bot-name-edit,
.bot-name-edit[open] {
  position: relative;
  width: auto !important;
  flex: 0 0 auto !important;
}

.bot-name-edit > summary,
.bot-name-edit[open] > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 72px;
  box-sizing: border-box;
}

.bot-name-edit-form {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 50px);
  z-index: 100;
  box-shadow: 0 15px 40px rgba(0,0,0,.45);
}

.bot-name-edit[open] {
  z-index: 110;
}

/* Keep an open bot editor above the other bot rows */
.bot {
  position: relative;
}

.bot:has(.bot-name-edit[open]) {
  z-index: 9999 !important;
}

.bot-name-edit[open] {
  z-index: 10000 !important;
}

.bot-name-edit-form {
  z-index: 10001 !important;
}

/* Allow the editor popup to extend outside the bot card */
.card:has(.bot-name-edit) {
  overflow: visible;
}


/* Owner active/saved bot dashboard */
.owner-stats {
  grid-template-columns: repeat(5, 1fr);
}

.pill.warning {
  background: #493311;
  color: #ffd88a;
  border-color: #866129;
}

.owner-cancel-note {
  margin-top: 4px;
  color: #e9bd70;
}

@media (max-width: 1100px) {
  .owner-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .owner-stats {
    grid-template-columns: 1fr;
  }
}

/* Owner dashboard wide layout */
.wrap:has(.owner-stats) {
  max-width: 1500px;
}

.wrap:has(.owner-stats) .table th,
.wrap:has(.owner-stats) .table td {
  padding: 10px 8px;
  font-size: 12px;
}

.wrap:has(.owner-stats) .table th {
  font-size: 11px;
}

.wrap:has(.owner-stats) .table td:nth-child(2) {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wrap:has(.owner-stats) .table-wrap {
  overflow-x: auto;
}
