:root {
  --bg-main: #090b10;
  --bg-panel: #111520;
  --bg-elevated: #171c2b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --shopee: #ee4d2d;
  --shopee-glow: rgba(238, 77, 45, 0.25);
  --wedrop: #06b6d4;
  --gemini: #8b5cf6;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
}

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

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.glass-card {
  background: linear-gradient(180deg, rgba(23, 28, 43, 0.92), rgba(17, 21, 32, 0.96));
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.brand-gradient {
  background: linear-gradient(135deg, #ee4d2d 0%, #f97316 45%, #8b5cf6 100%);
}

.brand-text-gradient {
  background: linear-gradient(90deg, #ff6b4a 0%, #fbbf24 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 11px;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.16s ease;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(238, 77, 45, 0.2), rgba(139, 92, 246, 0.12));
  color: #ffffff;
  border-color: rgba(238, 77, 45, 0.4);
  font-weight: 600;
}

.input-dark {
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #f8fafc;
  padding: 10px 13px;
  font-size: 0.9rem;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-dark:focus {
  outline: none;
  border-color: #ee4d2d;
  box-shadow: 0 0 0 3px rgba(238, 77, 45, 0.18);
}

.btn-primary {
  background: linear-gradient(135deg, #ee4d2d, #f97316);
  color: #ffffff;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 18px rgba(238, 77, 45, 0.3);
}

.btn-primary:hover {
  opacity: 0.94;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-weight: 500;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.15s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.11);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-green {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-red {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.16);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-violet {
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

/* Chat bubbles */
.chat-user {
  background: linear-gradient(135deg, #ee4d2d, #ea580c);
  color: #ffffff;
  border-radius: 16px 16px 4px 16px;
}

.chat-ai {
  background: #141926;
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #e2e8f0;
  border-radius: 16px 16px 16px 4px;
}

.chat-ai pre {
  background: #0a0d14;
  padding: 12px;
  border-radius: 10px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
}

.chat-ai code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 0.84em;
}

.chat-ai pre code {
  background: transparent;
  padding: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: #090b10;
}

::-webkit-scrollbar-thumb {
  background: #242b3d;
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: #374151;
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9999;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
