/* mistral-docker — tema Classic/Dark, estilo neomorfista.
   Principio: superficies del mismo color que el fondo, que parecen
   "salir" (convexo) o "hundirse" (cóncavo) por el juego de dos sombras
   (una oscura, una clara) en direcciones opuestas. Sin bordes duros. */

:root {
  --bg: #1b1c20;
  --surface: #1f2126;
  --surface-raised: #212328;
  --text: #e7e7ea;
  --text-dim: #8b8d96;
  --accent: #8b7bff;
  --accent-dim: #5f52b8;

  --shadow-dark: rgba(0, 0, 0, 0.55);
  --shadow-light: rgba(255, 255, 255, 0.035);

  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
}

.app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- header ---------- */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px 14px;
}

.brand {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-accent { color: var(--accent); }

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* ---------- neomorfismo base ---------- */

.neo-raised {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow:
    6px 6px 12px var(--shadow-dark),
    -6px -6px 12px var(--shadow-light);
}

.neo-inset {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow:
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}

.btn-neo {
  border: none;
  background: var(--surface-raised);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow:
    5px 5px 10px var(--shadow-dark),
    -5px -5px 10px var(--shadow-light);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.btn-neo:active {
  box-shadow:
    inset 3px 3px 6px var(--shadow-dark),
    inset -3px -3px 6px var(--shadow-light);
  transform: translateY(1px);
}

.btn-small { font-size: 0.8rem; padding: 8px 12px; }

.btn-send {
  color: var(--accent);
  font-weight: 600;
}

.btn-send:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ---------- chat ---------- */

.chat {
  flex: 1;
  overflow-y: auto;
  padding: 8px 4px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-card {
  text-align: center;
  color: var(--text-dim);
  padding: 24px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow:
    6px 6px 12px var(--shadow-dark),
    -6px -6px 12px var(--shadow-light);
}

.empty-sub { font-size: 0.85rem; margin-top: 6px; }

.msg {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: var(--radius);
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 0.95rem;
}

.msg.user {
  align-self: flex-end;
  background: var(--surface);
  box-shadow:
    4px 4px 8px var(--shadow-dark),
    -4px -4px 8px var(--shadow-light);
  border: 1px solid rgba(139, 123, 255, 0.15);
}

.msg.assistant {
  align-self: flex-start;
  background: var(--surface);
  box-shadow:
    inset 3px 3px 6px var(--shadow-dark),
    inset -3px -3px 6px var(--shadow-light);
}

.msg.assistant.pending {
  color: var(--text-dim);
  font-style: italic;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--accent);
  box-shadow:
    2px 2px 4px var(--shadow-dark),
    -2px -2px 4px var(--shadow-light);
}

.msg-error {
  align-self: flex-start;
  color: #ff8a8a;
  font-size: 0.85rem;
  padding: 10px 14px;
}

/* ---------- composer ---------- */

.composer {
  padding: 12px 4px 18px;
}

.composer-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow:
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}

.input-neo {
  flex: 1;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  padding: 8px;
  max-height: 140px;
}

.input-neo::placeholder { color: var(--text-dim); }

/* ---------- responsive ---------- */

@media (max-width: 480px) {
  .app { padding: 0 10px; }
  .msg { max-width: 90%; font-size: 0.9rem; }
  .app-header { padding: 14px 2px 10px; }
}
