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

:root {
  --bg-color: #020202; /* Palmpixel True Black */
  --panel-bg: rgba(20, 20, 20, 0.6); /* Dark Glass */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(229, 184, 11, 0.4);
  --gold-primary: #E5B80B; /* Palmpixel Glowing Gold */
  --gold-light: #FFD700;
  --gold-glow: rgba(229, 184, 11, 0.25);
  --text-primary: #F3F4F6;
  --text-muted: #9CA3AF;
  --success-color: #10B981;
  --danger-color: #EF4444;
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  height: 100vh;
  line-height: 1.5;
  overflow: hidden;
  background-image: radial-gradient(circle at 50% -20%, rgba(229, 184, 11, 0.05), transparent 40%);
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, .font-outfit {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

/* Glassmorphism Container */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 
    0 8px 32px 0 rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  padding: 30px;
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(229, 184, 11, 0.2);
  box-shadow: 
    0 10px 40px 0 rgba(0, 0, 0, 0.8),
    0 0 30px 0 rgba(229, 184, 11, 0.05),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* Premium Gold Button */
.btn-gold {
  background: linear-gradient(135deg, var(--gold-primary) 0%, #B8860B 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #000;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.03em;
  padding: 12px 24px;
  text-decoration: none;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px 0 rgba(229, 184, 11, 0.3);
  text-transform: uppercase;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px 0 rgba(229, 184, 11, 0.5),
    0 0 15px 0 rgba(229, 184, 11, 0.3);
  filter: brightness(1.15);
}

.btn-gold:active {
  transform: translateY(0);
}

/* Secondary Button */
.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-outline:hover {
  border-color: var(--gold-primary);
  background: rgba(229, 184, 11, 0.1);
  color: var(--gold-light);
  box-shadow: 0 0 15px 0 rgba(229, 184, 11, 0.15);
}

/* Input Fields */
.input-field {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 12px 16px;
  width: 100%;
  transition: var(--transition-smooth);
}

.input-field:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px 0 var(--gold-glow);
  outline: none;
  background: rgba(10, 10, 10, 0.8);
}

label {
  color: var(--text-muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

/* Table styling */
.custom-table-container {
  overflow-x: auto;
  margin-top: 15px;
}

table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}

th {
  border-bottom: 1px solid var(--border-color);
  color: var(--gold-primary);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 16px 18px;
  text-transform: uppercase;
}

td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 13px;
  padding: 16px 18px;
  color: var(--text-primary);
  transition: background 0.2s;
}

tr:hover td {
  background: rgba(229, 184, 11, 0.05);
  color: var(--gold-light);
}

/* Badges */
.badge {
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  text-transform: uppercase;
  display: inline-block;
  letter-spacing: 0.05em;
}

.badge-free { background: rgba(156, 163, 175, 0.15); color: #9CA3AF; border: 1px solid rgba(156, 163, 175, 0.3); }
.badge-pro { background: rgba(229, 184, 11, 0.15); color: var(--gold-primary); border: 1px solid rgba(229, 184, 11, 0.4); }
.badge-enterprise { background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(229, 184, 11, 0.15)); color: #D8B4FE; border: 1px solid rgba(168, 85, 247, 0.4); }

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.3); }

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* KPI Card */
.kpi-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi-title {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kpi-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  line-height: 1;
}

.kpi-value.gold {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(229, 184, 11, 0.3));
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(2, 2, 2, 0.85);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  white-space: nowrap;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-primary) 0%, #B8860B 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #000;
  box-shadow: 0 0 20px rgba(229, 184, 11, 0.4);
}

.logo-text {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  font-family: 'Outfit', sans-serif;
}

.logo-subtext {
  font-size: 9px;
  color: var(--gold-primary);
  font-weight: 800;
  letter-spacing: 0.25em;
  display: block;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-light);
  text-shadow: 0 0 10px rgba(229, 184, 11, 0.4);
}

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

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Alert Notification Banner */
.alert-banner {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #FCA5A5;
  padding: 16px 20px;
  font-size: 13px;
  margin-bottom: 24px;
  display: none;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.1);
}

/* ---- PREMIUM DARK GLASSMORPHISM POLISH ---- */

body {
  background-color: #020202; /* Palmpixel True Black */
  background-image: radial-gradient(circle at 50% -10%, rgba(229, 184, 11, 0.08) 0%, rgba(0,0,0,0) 40%),
                    radial-gradient(circle at -20% 50%, rgba(229, 184, 11, 0.03) 0%, rgba(0,0,0,0) 40%),
                    radial-gradient(circle at 120% 80%, rgba(229, 184, 11, 0.03) 0%, rgba(0,0,0,0) 40%);
  background-attachment: fixed;
}

/* Navbar Pills */
.nav-links.top-modules {
  display: flex;
  gap: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px; /* Pill shape */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.nav-item.active {
  background: rgba(229, 184, 11, 0.15);
  border-color: rgba(229, 184, 11, 0.3);
  color: var(--gold-primary);
  box-shadow: 0 0 20px rgba(229, 184, 11, 0.1);
}

/* Glass Panels */
.glass-panel {
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* AI Chat Panel */


.chat-header {
  padding: 25px 25px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-messages {
  flex: 1;
  padding: 25px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chat-message {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  animation: fadeIn 0.4s ease forwards;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-primary) 0%, #B8860B 100%);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(229, 184, 11, 0.3);
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-message.user .chat-avatar {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
}

.chat-bubble {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 15px 18px;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  max-width: 85%;
}

.chat-message.user .chat-bubble {
  background: rgba(229, 184, 11, 0.1);
  border-color: rgba(229, 184, 11, 0.2);
  color: var(--gold-light);
}

.chat-input-area {
  padding: 20px 25px 25px;
  background: linear-gradient(to top, rgba(5,5,5,0.9) 50%, transparent);
}

.chat-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.chat-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 16px 50px 16px 20px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.chat-input:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(229, 184, 11, 0.15);
  background: rgba(0, 0, 0, 0.8);
}

.chat-send-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-primary);
  border: none;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chat-send-btn:hover {
  background: #B8860B;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 0 15px rgba(229, 184, 11, 0.4);
}

/* Side menu hover */
.side-menu-btn {
  border-radius: 12px;
}
.side-menu-btn.active {
  background: linear-gradient(90deg, rgba(229, 184, 11, 0.15) 0%, transparent 100%);
  border-left: 4px solid var(--gold-primary);
}

/* Icons */
.hover-scale {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s;
}
.hover-scale:hover {
  transform: scale(1.15);
  color: var(--gold-primary) !important;
}

.nav-icon { font-size: 16px; margin-bottom: 2px; }
.nav-text { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }

/* App Layout Architecture - True Glassmorphism */
.app-layout {
  display: flex;
  width: 100%;
  flex: 1;
  background-color: transparent;
  overflow: hidden;
  position: relative;
}

.left-icon-bar {
  width: 70px;
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  gap: 15px;
  z-index: 10;
  flex-shrink: 0;
}

.left-sidebar {
  width: 240px;
  background: rgba(5, 5, 5, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  padding: 20px 10px;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9;
  flex-shrink: 0;
}

.left-sidebar.hidden {
  margin-left: -240px;
}

.main-content {
  flex: 1;
  padding: 30px 40px;
  overflow-y: auto;
  position: relative;
  background: transparent;
}

.right-tool-bar {
  width: 70px;
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  gap: 20px;
  z-index: 10;
  flex-shrink: 0;
}

.ai-chat-panel {
  position: absolute;
  top: 0;
  right: 70px; /* Attach next to the right-tool-bar */
  bottom: 0;
  width: 400px;
  background: rgba(15, 15, 15, 0.7);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(calc(100% + 70px));
  z-index: 20;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

.ai-chat-panel.active {
  transform: translateX(0);
}

.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  font-size: 22px;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transform: scale(1.05);
}

.icon-btn.active {
  background: rgba(229, 184, 11, 0.15);
  border-color: rgba(229, 184, 11, 0.3);
  color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(229, 184, 11, 0.2);
}
