:root {
  --text-main: #1e293b;
  --text-muted: #64748b;
  --neon-purple: #8b5cf6;
  --neon-teal: #10b981;
  --neon-blue: #3b82f6;
  --neon-pink: #f43f5e;
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.8);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
}

body {
  background-color: #e2e8f0;
  background-image:
    radial-gradient(circle at 20% 30%, #ffffff 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, #cbd5e1 0%, transparent 50%),
    radial-gradient(circle at 90% 10%, #f1f5f9 0%, transparent 40%),
    radial-gradient(circle at 10% 90%, #e2e8f0 0%, transparent 40%);
  color: var(--text-main);
  min-height: 100vh;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  box-shadow: 0 12px 40px -10px rgba(15, 23, 42, 0.12);
}

.page-center {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.card {
  width: 100%;
  max-width: 460px;
  border-radius: 24px;
  padding: 2rem;
}

.title {
  font-size: 1.8rem;
  color: var(--neon-purple);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.muted {
  color: var(--text-muted);
}

.stack {
  display: grid;
  gap: 1rem;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
}

input,
textarea,
button,
select {
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
}

input,
textarea,
select {
  background: rgba(255, 255, 255, 0.75);
  color: var(--text-main);
}

button {
  cursor: pointer;
  background: var(--text-main);
  color: #fff;
  border: 0;
  font-weight: 600;
}

button:hover {
  background: var(--neon-purple);
}

.secondary {
  background: #fff;
  color: var(--text-main);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.danger {
  background: var(--neon-pink);
}

.error {
  color: var(--neon-pink);
  font-size: 0.88rem;
}

.ok {
  color: #047857;
  font-size: 0.88rem;
}

.hidden {
  display: none !important;
}

.layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.35);
}

.sidebar a {
  display: block;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.8rem 1rem;
  border-radius: 10px;
  margin: 0.3rem 0;
}

.sidebar a.active {
  background: rgba(255, 255, 255, 0.9);
  color: var(--neon-purple);
}

.main {
  padding: 1.5rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.panel {
  border-radius: 16px;
  padding: 1rem;
}

.messages {
  height: 56vh;
  overflow: auto;
  padding: 1rem;
  border-radius: 14px;
}

.msg {
  margin-bottom: 0.8rem;
  max-width: 85%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  line-height: 1.45;
}

.msg.user {
  margin-left: auto;
  background: var(--neon-purple);
  color: #fff;
}

.msg.ai {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 0.6rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.9rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.send-btn {
  background: #e2e8f0;
  color: #94a3b8;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: 0.2s;
}

.send-btn.active {
  background: var(--text-main);
  color: #fff;
}

.send-btn:hover {
  transform: scale(1.05);
}
