/* Modern premium dark glassmorphism styling for SolvaAI B2B Dashboard */

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

:root {
  --bg-primary: #080c14;
  --bg-secondary: #0e1626;
  --bg-card: rgba(22, 34, 57, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(59, 130, 246, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #ef4444;

  --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* Sidebar styling */
.sidebar {
  width: 260px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  height: 100vh;
  z-index: 10;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  padding-left: 8px;
}

.logo-icon {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-item:hover, .nav-item.active {
  color: #fff;
  background-color: rgba(59, 130, 246, 0.1);
}

.nav-item.active {
  border-left: 3px solid var(--accent-blue);
  background-color: rgba(59, 130, 246, 0.15);
  box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.05);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Main content layout */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  background-image: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent 400px), 
                    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.03), transparent 300px);
}

.header-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.header-title h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-title p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-primary {
  background-color: var(--accent-blue);
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Tabs structure */
.tab-content {
  display: none;
  animation: fadeIn var(--transition-normal);
}

.tab-content.active {
  display: block;
}

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

/* Dashboard summary widgets Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.metric-card {
  background-color: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: var(--transition-normal);
}

.metric-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(59, 130, 246, 0.2);
}

.metric-info h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.metric-info .value {
  font-size: 28px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  margin: 12px 0 6px 0;
  background: linear-gradient(135deg, #fff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-info .desc {
  font-size: 12px;
  color: var(--text-muted);
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

.metric-icon.revenue {
  background-color: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.metric-icon.alert {
  background-color: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.15);
  color: var(--accent-rose);
}

.metric-icon.pending {
  background-color: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

/* Sections split */
.dashboard-split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

/* Panel cards container */
.panel-card {
  background-color: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.panel-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
}

/* Data Tables */
.table-container {
  overflow-x: auto;
  width: 100%;
}

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

.data-table th, .data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}

.data-table th {
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.data-table tbody tr {
  transition: var(--transition-fast);
}

.data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

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

/* Custom Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--accent-rose);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* User Profile Row */
.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  color: #fff;
}

.user-detail {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Quick Form fields styling */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Notifications layout (Onboarding cards) */
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.onboard-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
}

.onboard-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.onboard-card-header h3 {
  font-size: 14px;
  font-weight: 600;
}

.onboard-meta {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.onboard-actions {
  display: flex;
  gap: 10px;
}

.onboard-actions .btn {
  padding: 8px 14px;
  font-size: 12px;
}

/* Add Stock Modal Panel */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(8, 12, 20, 0.7);
  backdrop-filter: blur(8px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--transition-fast);
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 480px;
  max-width: 90%;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  animation: slideUp var(--transition-normal);
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
}

.modal-close {
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

/* ===================== Responsive Layout ===================== */

@media (max-width: 1100px) {
  .dashboard-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: 220px;
    padding: 20px 12px;
  }
  .main-content {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
    overflow: auto;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    position: sticky;
    top: 0;
  }

  .logo-container {
    margin-bottom: 0;
    margin-right: 20px;
    flex-shrink: 0;
    padding-left: 0;
  }

  .nav-links {
    flex-direction: row;
    gap: 4px;
    flex-shrink: 0;
  }

  .nav-item {
    padding: 8px 12px;
    white-space: nowrap;
    font-size: 13px;
  }

  .nav-item svg {
    width: 16px;
    height: 16px;
  }

  .sidebar-footer {
    display: none;
  }

  .main-content {
    height: auto;
    overflow-y: visible;
    padding: 20px 16px;
  }

  .header-panel {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }

  .header-title h1 {
    font-size: 22px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
  }

  .metric-card {
    padding: 16px;
  }

  .metric-info .value {
    font-size: 22px;
  }

  .panel-card {
    padding: 16px;
  }

  .modal-content {
    width: 92%;
    padding: 24px;
  }

  #onboarding-requests-container {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .data-table th,
  .data-table td {
    padding: 10px 8px;
    font-size: 12px;
  }

  .modal-content {
    padding: 18px;
  }

  .onboard-actions {
    flex-direction: column;
  }
}
