@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #0b1120;
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.topbar h1 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  background: linear-gradient(to right, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.nav a, .nav button {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav a:hover, .nav button:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.05);
}

.nav a.active, .nav button.active {
  color: white;
  background: var(--primary);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card h2 {
  margin: 0 0 24px 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
}

form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

form input, form select, form textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0f172a;
  color: white;
  font-size: 0.95rem;
  transition: all 0.2s;
}

form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

form button {
  grid-column: 1 / -1;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

form button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
  font-weight: 500;
  font-size: 0.9rem;
}

h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 8px 0;
}

/* Lists and Tables */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  text-align: left;
  padding: 16px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.table tr:last-child td {
  border-bottom: none;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list li {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  transition: 0.2s;
  font-size: 0.85rem;
}

.btn:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--text-muted);
}

.btn-primary {
  background: var(--primary);
  border-color: transparent;
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

/* Chat */
.chat {
  height: 400px;
  overflow-y: auto;
  padding: 20px;
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  border-bottom-left-radius: 2px;
  max-width: 80%;
  line-height: 1.5;
}

.msg .author {
  display: block;
  font-size: 0.75rem;
  color: var(--primary);
  margin-bottom: 4px;
  font-weight: 600;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}
