@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&display=swap");

:root {
  --primary-from: #0069d0;
  --primary-to: #498fff;
  --primary-gradient: linear-gradient(to right, #0069d0, #498fff);
  --surface: #0c1220;
  --panel: #0f172a;
  --border: #1f2a44;
  --muted: #94a3b8;
  --glow: rgba(73, 143, 255, 0.35);
  --grid: 8px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(73, 143, 255, 0.08), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(0, 105, 208, 0.12), transparent 26%),
    #0c1220;
  color: #e5e7eb;
  min-height: 100vh;
}

[x-cloak] {
  display: none !important;
}

.glass {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(12, 18, 32, 0.94));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(73, 143, 255, 0.05);
  backdrop-filter: blur(10px);
}

.btn-primary {
  background-image: var(--primary-gradient);
  color: #f8fafc;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px var(--glow);
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(73, 143, 255, 0.45);
}

.btn-ghost {
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.02);
}

.user-avatar {
  height: 48px;
  width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(73, 143, 255, 0.35);
  background: rgba(73, 143, 255, 0.18);
  color: #e2e8f0;
  font-weight: 600;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.4);
}

.user-avatar:hover {
  border-color: rgba(125, 211, 252, 0.6);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.45);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(73, 143, 255, 0.18);
  color: #dbeafe;
}

.input {
  width: 100%;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: #e5e7eb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.login-error {
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
  padding: 10px 12px;
  font-size: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.code-block {
  background: rgba(10, 14, 26, 0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  color: #cbd5f5;
  overflow: auto;
}

.hero-shape {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(0, 105, 208, 0.35), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(73, 143, 255, 0.25), transparent 28%);
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
}

.markdown-body {
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
}

.markdown-body p {
  margin: 0 0 0.35rem 0;
}

.markdown-body pre {
  background: rgba(10, 14, 26, 0.9);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  overflow: auto;
}

.markdown-body code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 13px;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  border: 1px solid var(--border);
}

.markdown-body th,
.markdown-body td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  background: rgba(15, 23, 42, 0.6);
}

.markdown-body thead th {
  background: rgba(73, 143, 255, 0.1);
}

.markdown-body ul,
.markdown-body ol {
  margin: 0.35rem 0 0.35rem 1.2rem;
  padding-left: 1rem;
}

.patient-mention {
  color: #7dd3fc;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.patient-mention:hover {
  color: #bae6fd;
}

.patient-mention:focus {
  outline: 2px solid rgba(125, 211, 252, 0.7);
  outline-offset: 2px;
}

.modal-card {
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.modal-card details summary {
  list-style: none;
}
.modal-card details summary::-webkit-details-marker {
  display: none;
}

.auto-tool-menu {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 260px;
  background: rgba(10, 14, 26, 0.95);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(73, 143, 255, 0.12);
  z-index: 10;
}

.auto-tool-list {
  max-height: 240px;
  overflow-y: auto;
}

.auto-tool-item {
  width: 100%;
  text-align: left;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.auto-tool-item:hover {
  border-color: rgba(73, 143, 255, 0.4);
  transform: translateY(-1px);
}

.auto-tool-item--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 18, 0.72);
  z-index: 50;
}

.tour-tooltip {
  position: fixed;
  z-index: 60;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  padding: 16px;
  max-width: calc(100vw - 24px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(73, 143, 255, 0.15);
}

.tour-step {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 6px;
}

.tour-title {
  font-size: 16px;
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 8px;
}

.tour-body {
  font-size: 13px;
  color: #cbd5f5;
  margin-bottom: 14px;
  line-height: 1.4;
}

.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tour-highlight {
  z-index: 70;
  box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.95), 0 0 24px rgba(56, 189, 248, 0.45);
  border-radius: 12px;
}

.tour-highlight--static {
  position: relative;
}
