:root {
  --bg-main: #000000;
  --bg-panel: #0a0a0c;
  --bg-hover: #141417;
  --bg-border: #222224;
  --bg-glass: rgba(10, 10, 12, 0.7);
  
  --text-primary: #ededed;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  
  --accent-primary: #3b82f6; /* premium blue */
  --accent-glow: rgba(59, 130, 246, 0.2);
  --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --radius: 8px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-sans); }

body {
  background: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; }
p { line-height: 1.6; }

/* Global Nav */
.site-nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--bg-border);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}
.nav-link:hover { color: var(--text-primary); }

/* Buttons */
.btn {
  background: var(--bg-panel);
  border: 1px solid var(--bg-border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn:hover { background: var(--bg-hover); border-color: #333; }
.btn-primary {
  background: var(--text-primary);
  color: var(--bg-main);
  border: none;
}
.btn-primary:hover {
  background: #fff;
  transform: translateY(-1px);
}

/* Cards & Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}
.hero {
  text-align: center;
  padding: 120px 20px;
}
.hero h1 {
  font-size: 4rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}
.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
}

/* Dashboard App Layout */
#app-view {
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.sidebar {
  width: 280px;
  background: var(--bg-panel);
  border-right: 1px solid var(--bg-border);
  display: flex;
  flex-direction: column;
}
.sidebar-header {
  height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--bg-border);
}
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
}
.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.chat-input-wrapper {
  padding: 24px 40px;
  background: var(--bg-main);
  border-top: 1px solid var(--bg-border);
}
.chat-input {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text-primary);
  font-size: 1rem;
  resize: none;
  outline: none;
  transition: var(--transition);
}
.chat-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* Admin & Tables */
.table-wrapper {
  background: var(--bg-panel);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 24px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--bg-border);
  font-size: 0.9rem;
}
th { color: var(--text-secondary); font-weight: 500; }
tr:last-child td { border-bottom: none; }

/* Pricing Cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.pricing-card {
  background: var(--bg-panel);
  border: 1px solid var(--bg-border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}
.pricing-card h3 { font-size: 1.5rem; margin-bottom: 12px; }
.pricing-card .price { font-size: 2.5rem; font-weight: 700; margin-bottom: 24px; color: var(--text-primary); }
/* Add Modal CSS */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: var(--transition);
  z-index: 1000;
  backdrop-filter: blur(4px);
}
.modal-overlay.active {
  opacity: 1; pointer-events: auto;
}
.modal-content {
  transform: translateY(20px);
  transition: var(--transition);
}
.modal-overlay.active .modal-content {
  transform: translateY(0);
}
/* Toast CSS */
.toast {
  background: var(--bg-panel);
  border: 1px solid var(--bg-border);
  color: var(--text-primary);
  padding: 16px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast.success { border-color: var(--accent-success, #16a34a); }
.toast.danger { border-color: var(--accent-danger, #dc2626); }
.toast.info { border-color: var(--accent-primary, #3b82f6); }
/* Chat Bubble CSS */
.chat-message {
  display: flex; gap: 16px; max-width: 800px; margin: 0 auto; width: 100%; padding: 24px 0;
}
.message-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--bg-panel); border: 1px solid var(--bg-border);
  display: flex; align-items: center; justify-content: center; font-weight: 500; font-size: 0.8rem; overflow: hidden;
}
.message-body {
  flex: 1; line-height: 1.7; color: var(--text-primary);
}
.message-body pre {
  background: var(--bg-panel); padding: 16px; border-radius: var(--radius); border: 1px solid var(--bg-border);
  overflow-x: auto; font-family: var(--font-mono); font-size: 0.85rem; margin: 12px 0;
}
.message-body code {
  font-family: var(--font-mono); font-size: 0.85em; background: rgba(255,255,255,0.1); padding: 2px 4px; border-radius: 4px;
}
