.glai-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: #fff;
  font: 600 15px/1 system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(15, 118, 110, 0.35);
}

.glai-launcher:focus {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
}

.glai-panel {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 99999;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  background: #0b1f1c;
  color: #e7f6f3;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  font: 15px/1.45 system-ui, sans-serif;
  overflow: hidden;
}

.glai-panel-assistant {
  background: #1a1208;
  color: #f8efe2;
}

.glai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: linear-gradient(135deg, #0f766e, #134e4a);
  color: #f0fdfa;
}

.glai-panel-assistant .glai-header {
  background: linear-gradient(135deg, #b45309, #92400e);
  color: #fffbeb;
}

.glai-title { font-weight: 650; letter-spacing: 0.01em; }

.glai-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.glai-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.15);
}

.glai-tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 12px;
  cursor: pointer;
  font: inherit;
  color: rgba(255, 255, 255, 0.55);
}

.glai-tab-active {
  color: #fff;
  font-weight: 650;
  border-bottom: 2px solid #5eead4;
}

.glai-panel-assistant .glai-tab-active {
  border-bottom-color: #fbbf24;
}

.glai-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: radial-gradient(circle at top, rgba(45, 212, 191, 0.08), transparent 60%), #0b1f1c;
}

.glai-panel-assistant .glai-body {
  background: radial-gradient(circle at top, rgba(251, 191, 36, 0.1), transparent 60%), #1a1208;
}

.glai-msg {
  margin: 8px 0;
  padding: 10px 14px;
  border-radius: 16px;
  max-width: 85%;
  word-wrap: break-word;
}

.glai-msg-user {
  margin-left: auto;
  background: #14b8a6;
  color: #042f2e;
  border-bottom-right-radius: 4px;
}

.glai-panel-assistant .glai-msg-user {
  background: #f59e0b;
  color: #451a03;
}

.glai-msg-bot {
  background: rgba(255, 255, 255, 0.08);
  color: #e7f6f3;
  border-bottom-left-radius: 4px;
}

.glai-panel-assistant .glai-msg-bot {
  color: #f8efe2;
}

.glai-msg-pending {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
}

.glai-gate {
  padding: 32px 16px;
  text-align: center;
  color: #f8efe2;
}

.glai-signin,
.glai-send,
.glai-confirm {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  background: #14b8a6;
  color: #042f2e;
  font: 650 14px/1 system-ui, sans-serif;
  cursor: pointer;
}

.glai-panel-assistant .glai-signin,
.glai-panel-assistant .glai-send,
.glai-panel-assistant .glai-confirm {
  background: #f59e0b;
  color: #451a03;
}

.glai-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.glai-input {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.glai-input::placeholder { color: rgba(255, 255, 255, 0.4); }

@media (max-width: 600px) {
  .glai-panel {
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .glai-launcher {
    right: 16px;
    bottom: 16px;
  }
}

.glai-draft { padding: 12px; margin: 8px 0; border: 1px solid #cbd5e1; border-radius: 8px; }
.glai-draft pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; max-height: 240px; overflow-y: auto; }
.glai-confirm-result { margin-top: 8px; }
