/* --- Base Theme Variables --- */
:root {
  --primary-blue: #2563eb;
  --light-blue: #eff6ff;
  --dark-blue: #1e3a8a;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.4);
}

/* --- Layout Reset --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
  background-attachment: fixed;
  color: #1e293b;
  overflow-x: hidden;
}

/* --- Glassmorphism Core --- */
.glass-nav {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.08);
}

/* --- Navigation & Links --- */
.nav-link {
  position: relative;
  cursor: pointer;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-blue);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary-blue);
  font-weight: 700;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #bfdbfe;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-blue);
}

/* --- Animations --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-transition {
  animation: fadeIn 0.4s ease-out forwards;
}

/* --- Status Badges --- */
.badge-blue {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-blue);
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* --- Chat Specifics --- */
#chat-content {
  scrollbar-width: thin;
}

.message-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.message-bot {
  background: #f1f5f9;
  color: #334155;
  border-bottom-left-radius: 4px;
}

.message-user {
  background: var(--primary-blue);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* --- Dashboard Grid Helpers --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.metric-card {
  padding: 1.5rem;
  border-radius: 1.25rem;
  display: flex;
  flex-direction: column;
}

/* --- Additional Animations --- */
@keyframes slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* --- Utility Classes --- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.animate-slide-in {
  animation: slide-in 0.3s ease-out;
}

/* --- Cart Badge --- */
.shopping-cart-badge {
  transition: all 0.3s ease;
}

.shopping-cart-badge:empty {
  display: none;
}
