:root{
  --t-bg: #0b1220;
  --t-surface: #0f172a;
  --t-border: #1f2937;
  --t-text: #e5e7eb;
  --t-muted: #9ca3af;
  --t-primary: #6366f1;
  --t-green: #22c55e;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(0,0,0,.35);
  --transition: 180ms ease;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.terminio-bubble{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--t-primary), #7c83ff);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  color: white;
  cursor: pointer;
  z-index: 999999;
  border: 1px solid rgba(255,255,255,.12);
  transition: transform var(--transition), filter var(--transition);
}
.terminio-bubble:hover{ transform: translateY(-2px); filter: brightness(1.05); }

.terminio-panel{
  position: fixed;
  right: 18px;
  bottom: 88px;
  width: min(360px, calc(100vw - 36px));
  height: 520px;
  background: var(--t-bg);
  border: 1px solid var(--t-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: none;
  flex-direction: column;
  z-index: 999999;
}

.terminio-panel.open{ display: flex; }

.terminio-header{
  padding: 14px 14px 10px 14px;
  background: radial-gradient(1200px 400px at 10% 0%, rgba(99,102,241,.18), transparent 50%);
  border-bottom: 1px solid var(--t-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.terminio-dot{
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--t-green);
  box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}
.terminio-title{
  color: var(--t-text);
  font-weight: 600;
  font-size: 14px;
}
.terminio-sub{
  color: var(--t-muted);
  font-size: 11px;
}

.terminio-close{
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--t-muted);
  font-size: 18px;
  cursor: pointer;
}

.terminio-body{
  padding: 14px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.msg{
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.35;
  font-size: 12.5px;
  white-space: pre-line;
}

.msg.user{
  align-self: flex-end;
  background: rgba(99,102,241,.18);
  border: 1px solid rgba(99,102,241,.35);
  color: var(--t-text);
}

.msg.bot{
  align-self: flex-start;
  background: var(--t-surface);
  border: 1px solid var(--t-border);
  color: var(--t-text);
}

.terminio-quick{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 12px 14px;
}

.qbtn{
  background: var(--t-surface);
  border: 1px solid var(--t-border);
  color: var(--t-text);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.qbtn:hover{ border-color: rgba(99,102,241,.5); }

.terminio-footer{
  border-top: 1px solid var(--t-border);
  padding: 10px;
  display: flex;
  gap: 8px;
  background: #0a0f1d;
}

.terminio-input{
  flex: 1;
  background: var(--t-surface);
  border: 1px solid var(--t-border);
  color: var(--t-text);
  padding: 10px 10px;
  border-radius: 10px;
  font-size: 12px;
  outline: none;
}
.terminio-input:focus{ border-color: rgba(99,102,241,.6); }

.terminio-send{
  background: var(--t-primary);
  border: 0;
  color: white;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

.terminio-small{
  color: var(--t-muted);
  font-size: 10px;
  padding: 0 14px 10px 14px;
}
