/* Web chat in cabinet */
.web-chat-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.web-chat-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.web-chat-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.web-chat-messages {
  height: min(48vh, 380px);
  min-height: 200px;
  overflow-y: auto;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.web-chat-bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.web-chat-bubble.user {
  align-self: flex-end;
  background: var(--accent-dim);
  border: 1px solid rgba(61, 139, 253, 0.35);
}

.web-chat-bubble.assistant {
  align-self: flex-start;
  background: #141b24;
  border: 1px solid var(--border);
}

.web-chat-bubble.system {
  align-self: center;
  max-width: 100%;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 4px;
}

.web-chat-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.web-chat-form input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

.web-chat-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.web-chat-form button {
  flex-shrink: 0;
}

.web-chat-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.web-chat-note {
  margin: 10px 0 0;
  font-size: 0.82rem;
}

.web-chat-typing {
  align-self: flex-start;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 4px 8px;
}

.cabinet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.cabinet-tabs a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}

.cabinet-tabs a:hover,
.cabinet-tabs a.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
