/* ============================================
   Project Access — AccessHub Inc.
   Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
  /* Primary Brand Colors */
  --primary-blue: #2563EB;
  --primary-blue-dark: #1D4ED8;
  --primary-blue-light: #3B82F6;

  /* Role Theme Colors */
  --role-regular: #2563EB;
  --role-freelancer: #16A34A;
  --role-client: #F59E0B;
  --role-creator: #7C3AED;
  --role-seller: #D97706;
  --role-entrepreneur: #475569;
  --role-partner: #4F46E5;
  --role-investor: #0D9488;
  --role-admin: #1E3A5F;

  /* Neutral Colors */
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-dark: #0F172A;
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-light: #94A3B8;
  --border-color: #E2E8F0;

  /* Status Colors */
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  /* Gradients */
  --gradient-purple: linear-gradient(135deg, #7C3AED, #A855F7);
  --gradient-blue: linear-gradient(135deg, #2563EB, #3B82F6);
  --gradient-login: linear-gradient(135deg, #4C1D95, #1E3A8A, #2563EB);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);

  /* Current role color (set by JS) */
  --current-role-color: var(--primary-blue);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 500; }

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: var(--primary-blue-dark); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  transition: all 0.15s ease;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--current-role-color, var(--primary-blue));
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ============================================
   Screen Management
   ============================================ */
.screen {
  display: none;
  animation: fadeIn 0.3s ease;
}

.screen.active {
  display: block;
}

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

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes slideOutRight {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes growBar {
  from { width: 0; }
  to { width: var(--bar-width); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   Login Screen
   ============================================ */
#login-screen {
  min-height: 100vh;
  background: var(--gradient-login);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}

#login-screen::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
  animation: pulse 8s ease-in-out infinite;
  pointer-events: none;
}

.login-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.login-logo img {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-md);
  border-radius: var(--radius-lg);
}

.login-logo h1 {
  color: var(--text-primary);
  font-size: 1.75rem;
  margin-bottom: var(--space-xs);
}

.login-logo p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.login-form .form-group {
  margin-bottom: var(--space-md);
}

.login-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.1rem;
  padding: 4px;
}

.password-strength {
  height: 4px;
  border-radius: 2px;
  background: var(--border-color);
  margin-top: var(--space-xs);
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  border-radius: 2px;
  background: var(--success);
  width: 80%;
  transition: width 0.3s;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.15s ease;
  border: none;
  cursor: pointer;
  line-height: 1.5;
}

.btn-primary {
  background: var(--current-role-color, var(--primary-blue));
  color: white;
}
.btn-primary:hover {
  filter: brightness(0.9);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: var(--border-color);
}

.btn-success { background: var(--success); color: white; }
.btn-success:hover { filter: brightness(0.9); }

.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { filter: brightness(0.9); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { filter: brightness(0.9); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
}
.btn-ghost:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.btn-full { width: 100%; }

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.login-btn {
  background: var(--primary-blue);
  color: white;
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  margin-top: var(--space-sm);
}
.login-btn:hover {
  background: var(--primary-blue-dark);
  box-shadow: var(--shadow-md);
}

.login-links {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-md);
  font-size: 0.875rem;
}

.login-links a {
  color: var(--primary-blue);
}

.security-indicators {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
}

.security-badge {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.security-badge .icon {
  font-size: 1rem;
}

.demo-hint {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin-top: var(--space-lg);
  font-size: 0.8125rem;
  color: var(--primary-blue);
  text-align: center;
}

.demo-hint strong {
  display: block;
  margin-bottom: 2px;
}

/* 2FA Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  padding: var(--space-lg);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.25s ease;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: background 0.15s;
}
.modal-close:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.tfa-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.tfa-header .shield-icon {
  font-size: 3rem;
  margin-bottom: var(--space-sm);
}

.tfa-header h2 {
  margin-bottom: var(--space-xs);
}

.tfa-header p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.tfa-code-input {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.5rem;
  font-weight: 600;
  padding: 0.75rem;
}

.device-info {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: var(--space-md) 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.device-info div {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.device-info div:last-child {
  margin-bottom: 0;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ============================================
   Sign-Up Screen
   ============================================ */
#signup-screen {
  min-height: 100vh;
  background: var(--gradient-login);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.signup-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-xl);
}

.signup-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-xl);
}

.signup-step {
  display: flex;
  align-items: center;
  gap: 0;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--border-color);
  color: var(--text-light);
  transition: all 0.3s;
  flex-shrink: 0;
}

.step-circle.active {
  background: #F59E0B;
  color: white;
}

.step-circle.completed {
  background: var(--success);
  color: white;
}

.step-line {
  width: 40px;
  height: 2px;
  background: var(--border-color);
  transition: background 0.3s;
}

.step-line.completed {
  background: var(--success);
}

.signup-step-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.signup-step-content.active {
  display: block;
}

.signup-step-content h2 {
  margin-bottom: var(--space-sm);
}

.signup-step-content p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--space-lg);
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.interest-chip {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.875rem;
}

.interest-chip:hover {
  border-color: var(--primary-blue-light);
}

.interest-chip.selected {
  border-color: var(--primary-blue);
  background: #EFF6FF;
}

.social-link-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.social-link-row span {
  width: 28px;
  text-align: center;
  font-size: 1.1rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-color);
}

.toggle-row:last-child {
  border-bottom: none;
}

.toggle-label {
  font-weight: 500;
  font-size: 0.9375rem;
}

.toggle-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border-color);
  border-radius: var(--radius-full);
  transition: 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary-blue);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.signup-success {
  text-align: center;
  padding: var(--space-xl) 0;
}

.signup-success .mascot {
  font-size: 4rem;
  margin-bottom: var(--space-md);
}

.signup-success h2 {
  margin-bottom: var(--space-sm);
}

.signup-nav {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xl);
}

/* ============================================
   Role Selection Screen
   ============================================ */
#role-select-screen {
  min-height: 100vh;
  background: var(--bg-primary);
  padding: var(--space-2xl) var(--space-lg);
}

.role-select-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.role-select-header h1 {
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.role-select-header p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

.role-select-note {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-top: var(--space-sm);
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  max-width: 960px;
  margin: 0 auto;
}

.role-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.role-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.role-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-color);
}

.role-card .role-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.role-card .role-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.role-card .role-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

.role-card .btn {
  font-size: 0.8125rem;
  padding: 0.5rem 1.25rem;
}

/* ============================================
   Dashboard Layout
   ============================================ */
#dashboard-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Navigation */
.top-nav {
  height: 60px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  text-decoration: none;
}

.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

.nav-logo span {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
}

.nav-role-label {
  background: var(--current-role-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 var(--space-xl);
}

.search-bar {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.search-bar input {
  width: 100%;
  padding: 0.5rem 0.875rem 0.5rem 2.25rem;
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.search-bar .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 0.875rem;
  pointer-events: none;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 200;
  max-height: 320px;
  overflow-y: auto;
}

.search-dropdown.active {
  display: block;
}

.search-category {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-item {
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.1s;
}

.search-item:hover {
  background: var(--bg-primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.nav-btn:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.nav-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: var(--danger);
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-security {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  color: var(--success);
  padding: 0.25rem 0.5rem;
  background: rgba(34, 197, 94, 0.1);
  border-radius: var(--radius-full);
}

/* User dropdown */
.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  background: none;
  border: none;
  transition: background 0.15s;
}

.user-menu-trigger:hover {
  background: var(--bg-primary);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--current-role-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: white;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 200;
  overflow: hidden;
}

.user-menu-dropdown.active {
  display: block;
  animation: scaleIn 0.15s ease;
}

.user-menu-info {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.user-menu-info .name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.user-menu-info .email {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.625rem var(--space-md);
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.1s;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
}

.user-menu-item:hover {
  background: var(--bg-primary);
}

.user-menu-item.danger {
  color: var(--danger);
}

.user-menu-divider {
  height: 1px;
  background: var(--border-color);
}

/* Notification dropdown */
.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 200;
  max-height: 400px;
  overflow-y: auto;
}

.notification-dropdown.active {
  display: block;
  animation: scaleIn 0.15s ease;
}

.notification-header {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-header h4 {
  font-size: 0.9375rem;
}

.notification-item {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: var(--space-sm);
  cursor: pointer;
  transition: background 0.1s;
}

.notification-item:hover {
  background: var(--bg-primary);
}

.notification-item.unread {
  background: #EFF6FF;
}

.notification-item .notif-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.notification-item .notif-text {
  font-size: 0.8125rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.notification-item .notif-time {
  font-size: 0.6875rem;
  color: var(--text-light);
  margin-top: 2px;
}

/* Dashboard body */
.dashboard-body {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 60px);
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: var(--space-md) 0;
  flex-shrink: 0;
  overflow-y: auto;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  transition: width 0.2s;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.625rem var(--space-lg);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  border-left: 3px solid transparent;
  margin-bottom: 2px;
}

.sidebar-item:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.sidebar-item.active {
  background: rgba(37, 99, 235, 0.06);
  color: var(--current-role-color);
  border-left-color: var(--current-role-color);
  font-weight: 500;
}

.sidebar-item .item-icon {
  font-size: 1.125rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-section-label {
  padding: var(--space-md) var(--space-lg) var(--space-xs);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Main content area */
.main-content {
  flex: 1;
  padding: var(--space-lg);
  min-width: 0;
  overflow-y: auto;
}

.content-header {
  margin-bottom: var(--space-lg);
}

.content-header h2 {
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.content-header p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Right sidebar */
.right-sidebar {
  width: 300px;
  padding: var(--space-lg);
  flex-shrink: 0;
  overflow-y: auto;
  border-left: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.right-sidebar-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.right-sidebar-card h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

/* ============================================
   Stats Cards
   ============================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.stat-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  animation: countUp 0.4s ease;
  transition: transform 0.15s, box-shadow 0.15s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card.highlight {
  border-color: var(--danger);
  background: #FEF2F2;
}

.stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ============================================
   Content Cards
   ============================================ */
.card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.card-header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.card-body {
  padding: var(--space-lg);
}

.card-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
}

/* Feed post cards */
.feed-post {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.feed-post-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.feed-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: white;
  flex-shrink: 0;
}

.feed-user-info .feed-username {
  font-weight: 600;
  font-size: 0.9375rem;
}

.feed-user-info .feed-time {
  font-size: 0.75rem;
  color: var(--text-light);
}

.feed-content {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.feed-actions {
  display: flex;
  gap: var(--space-lg);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-color);
}

.feed-action-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.feed-action-btn:hover {
  background: var(--bg-primary);
  color: var(--current-role-color);
}

/* Create post card */
.create-post-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.create-post-card input {
  flex: 1;
  border: none;
  background: var(--bg-primary);
  border-radius: var(--radius-full);
  padding: 0.625rem var(--space-md);
}

/* ============================================
   Data Tables
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  text-align: left;
  padding: 0.75rem var(--space-md);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-color);
  background: var(--bg-primary);
}

.data-table td {
  padding: 0.75rem var(--space-md);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.data-table tr:hover td {
  background: var(--bg-primary);
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge.new { background: #DBEAFE; color: #1D4ED8; }
.status-badge.active { background: #DCFCE7; color: #15803D; }
.status-badge.pending { background: #FEF3C7; color: #B45309; }
.status-badge.completed { background: #D1FAE5; color: #065F46; }
.status-badge.funded { background: #CFFAFE; color: #0E7490; }
.status-badge.shortlisted { background: #E0E7FF; color: #4338CA; }
.status-badge.interview { background: #FDE68A; color: #92400E; }
.status-badge.rejected { background: #FEE2E2; color: #B91C1C; }
.status-badge.phase2 { background: #F3E8FF; color: #7C3AED; font-style: italic; }

/* ============================================
   CSS Charts
   ============================================ */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: var(--space-sm);
  height: 120px;
  padding-top: var(--space-md);
}

.bar-chart .bar {
  flex: 1;
  background: var(--current-role-color, var(--primary-blue));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  min-width: 20px;
  position: relative;
  transition: height 0.5s ease;
  opacity: 0.8;
}

.bar-chart .bar:hover {
  opacity: 1;
}

.bar-chart .bar-label {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.625rem;
  color: var(--text-light);
  white-space: nowrap;
}

.bar-chart .bar-value {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Line chart (CSS) */
.line-chart {
  position: relative;
  height: 100px;
  border-bottom: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  margin: var(--space-md) 0;
}

.line-chart-svg {
  width: 100%;
  height: 100%;
}

/* Circular gauge */
.gauge {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto;
}

.gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 8;
}

.gauge-fill {
  fill: none;
  stroke: var(--success);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 251;
  stroke-dashoffset: 15;
  transition: stroke-dashoffset 1s ease;
}

.gauge-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Progress bars */
.progress-bar {
  height: 8px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--space-xs) 0;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--current-role-color, var(--primary-blue));
  transition: width 0.5s ease;
}

/* ============================================
   Quick Actions
   ============================================ */
.quick-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.5rem var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s;
}

.quick-action-btn:hover {
  border-color: var(--current-role-color);
  color: var(--current-role-color);
  background: rgba(37, 99, 235, 0.04);
}

/* ============================================
   Product Grid
   ============================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.product-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.15s;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
}

.product-card .product-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.product-card .product-name {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: var(--space-xs);
}

.product-card .product-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--current-role-color);
  margin-bottom: var(--space-xs);
}

.product-card .product-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.product-card .product-actions {
  display: flex;
  gap: var(--space-sm);
}

/* ============================================
   Content Grid (Creator)
   ============================================ */
.content-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.content-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.15s;
}

.content-item:hover {
  box-shadow: var(--shadow-md);
}

.content-item .content-type {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--current-role-color);
  margin-bottom: var(--space-xs);
}

.content-item .content-title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: var(--space-sm);
}

.content-item .content-stats {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ============================================
   Job Cards (Freelancer)
   ============================================ */
.job-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  transition: all 0.15s;
}

.job-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--current-role-color);
}

.job-card .job-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.job-card .job-meta {
  display: flex;
  gap: var(--space-md);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.job-card .job-meta span {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.job-card .job-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

/* ============================================
   Tabs
   ============================================ */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: var(--space-lg);
  gap: 0;
}

.tab-btn {
  padding: 0.625rem var(--space-lg);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--current-role-color);
  border-bottom-color: var(--current-role-color);
}

/* ============================================
   Locked Features Banner
   ============================================ */
.locked-banner {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 1px solid #F59E0B;
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.locked-banner .lock-icon {
  font-size: 1.5rem;
}

.locked-banner .lock-text {
  font-size: 0.875rem;
  color: #92400E;
}

.locked-banner .lock-text strong {
  display: block;
  margin-bottom: 2px;
}

/* Warning banner */
.warning-banner {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  font-size: 0.875rem;
  color: #991B1B;
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

/* Security notice */
.security-notice {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  font-size: 0.875rem;
  color: #1E40AF;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ============================================
   AI Assistant Panel
   ============================================ */
.ai-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100vh;
  background: var(--bg-secondary);
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  z-index: 500;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

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

.ai-panel-header {
  padding: var(--space-md) var(--space-lg);
  background: var(--gradient-purple);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.ai-panel-header h3 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1rem;
}

.ai-panel-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
}

.ai-panel-close:hover {
  background: rgba(255,255,255,0.3);
}

.ai-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.ai-tab {
  flex: 1;
  padding: 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.ai-tab:hover {
  color: var(--text-primary);
}

.ai-tab.active {
  color: #7C3AED;
  border-bottom-color: #7C3AED;
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.ai-message {
  display: flex;
  gap: var(--space-sm);
  max-width: 90%;
}

.ai-message.assistant {
  align-self: flex-start;
}

.ai-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.ai-message.assistant .ai-msg-avatar {
  background: var(--gradient-purple);
  color: white;
}

.ai-message.user .ai-msg-avatar {
  background: var(--primary-blue);
  color: white;
}

.ai-msg-bubble {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.ai-message.assistant .ai-msg-bubble {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-bottom-left-radius: var(--radius-sm);
}

.ai-message.user .ai-msg-bubble {
  background: var(--primary-blue);
  color: white;
  border-bottom-right-radius: var(--radius-sm);
}

.ai-quick-actions {
  padding: var(--space-sm) var(--space-md);
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.ai-quick-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.ai-quick-btn:hover {
  border-color: #7C3AED;
  color: #7C3AED;
  background: #F5F3FF;
}

.ai-input-area {
  padding: var(--space-md);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.ai-input-area input {
  flex: 1;
  border-radius: var(--radius-full);
  padding: 0.5rem var(--space-md);
  font-size: 0.875rem;
}

.ai-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #7C3AED;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.ai-send-btn:hover {
  background: #6D28D9;
}

/* AI Suggestions tab content */
.ai-suggestions-content,
.ai-generation-content,
.ai-insights-content {
  padding: var(--space-md);
  overflow-y: auto;
  flex: 1;
}

.suggestion-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.suggestion-card:hover {
  border-color: #7C3AED;
  background: #F5F3FF;
}

.suggestion-card .suggestion-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: var(--space-xs);
}

.suggestion-card .suggestion-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ============================================
   AI Guardian Panel
   ============================================ */
.guardian-modal .modal-content {
  max-width: 560px;
}

.guardian-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.guardian-header .shield {
  font-size: 3rem;
  margin-bottom: var(--space-sm);
}

.guardian-header h2 {
  margin-bottom: var(--space-xs);
}

.guardian-header p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.security-score-section {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.security-events {
  margin-bottom: var(--space-lg);
}

.security-event {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.security-event:last-child {
  border-bottom: none;
}

.security-event .event-icon {
  font-size: 1.125rem;
}

.security-event .event-time {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-light);
}

.protection-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

.protection-toggle:last-child {
  border-bottom: none;
}

.protection-toggle .prot-label {
  font-size: 0.875rem;
  font-weight: 500;
}

/* ============================================
   Documentation Overlay
   ============================================ */
.docs-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-secondary);
  z-index: 600;
  display: none;
  flex-direction: column;
}

.docs-overlay.active {
  display: flex;
}

.docs-header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.docs-header h2 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.docs-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.docs-sidebar {
  width: 260px;
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  padding: var(--space-md);
  flex-shrink: 0;
  background: var(--bg-primary);
}

.docs-nav-item {
  display: block;
  padding: 0.5rem var(--space-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 2px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.docs-nav-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.docs-nav-item.active {
  background: var(--primary-blue);
  color: white;
}

.docs-nav-section {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-md) var(--space-md) var(--space-xs);
}

.docs-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-xl) var(--space-2xl);
}

.docs-content h2 {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--border-color);
}

.docs-content h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.docs-content p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  line-height: 1.7;
}

.docs-content ul, .docs-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.docs-content li {
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
  line-height: 1.6;
}

.docs-content code {
  background: var(--bg-primary);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: #7C3AED;
}

.docs-image {
  margin: var(--space-lg) 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.docs-image img {
  width: 100%;
  height: auto;
}

/* ============================================
   Settings Screen
   ============================================ */
.settings-section {
  margin-bottom: var(--space-xl);
}

.settings-section h3 {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-color);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-color);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-label {
  font-weight: 500;
  font-size: 0.9375rem;
}

.settings-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  top: 80px;
  right: var(--space-lg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  animation: slideInToast 0.3s ease;
  border-left: 4px solid var(--info);
  min-width: 280px;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

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

/* ============================================
   Referral Link Display
   ============================================ */
.referral-link-box {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
}

.referral-link-box code {
  flex: 1;
  font-size: 0.875rem;
  color: var(--primary-blue);
  background: none;
  padding: 0;
}

.referral-link-box .copy-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  background: var(--primary-blue);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.referral-link-box .copy-btn:hover {
  background: var(--primary-blue-dark);
}

/* ============================================
   Business Profile Card
   ============================================ */
.business-profile {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
}

.business-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--current-role-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  flex-shrink: 0;
}

.business-info h3 {
  margin-bottom: var(--space-xs);
}

.business-info p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.business-actions {
  display: flex;
  gap: var(--space-sm);
  margin-left: auto;
}

/* ============================================
   Company Card (Investor)
   ============================================ */
.company-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.company-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--current-role-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

.company-details h3 {
  margin-bottom: var(--space-xs);
}

.company-details p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ============================================
   Partner Profile Card
   ============================================ */
.partner-profile {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
}

.partner-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--current-role-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

.partner-info h3 {
  margin-bottom: var(--space-xs);
}

.partner-info p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.partner-badge {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.partner-badge .tier {
  background: #FEF3C7;
  color: #B45309;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ============================================
   Pending Approvals Card
   ============================================ */
.approvals-card {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.approvals-card h4 {
  margin-bottom: var(--space-sm);
  color: #92400E;
}

.approvals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) 0;
  font-size: 0.875rem;
  color: #92400E;
}

/* ============================================
   Suggested Accounts
   ============================================ */
.suggested-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
}

.suggested-user .su-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: white;
  flex-shrink: 0;
}

.suggested-user .su-info {
  flex: 1;
  min-width: 0;
}

.suggested-user .su-name {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggested-user .su-handle {
  font-size: 0.6875rem;
  color: var(--text-light);
}

.follow-btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  background: var(--primary-blue);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  flex-shrink: 0;
}

.follow-btn:hover {
  background: var(--primary-blue-dark);
}

/* Trending topics */
.trending-item {
  padding: var(--space-xs) 0;
  font-size: 0.8125rem;
}

.trending-item a {
  color: var(--primary-blue);
  font-weight: 500;
}

.trending-item .trend-count {
  font-size: 0.6875rem;
  color: var(--text-light);
}

/* ============================================
   Team Members List
   ============================================ */
.team-member {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

.team-member:last-child {
  border-bottom: none;
}

.team-member .tm-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: white;
  flex-shrink: 0;
}

.team-member .tm-name {
  font-size: 0.8125rem;
  font-weight: 500;
}

.team-member .tm-role {
  font-size: 0.6875rem;
  color: var(--text-light);
}

/* ============================================
   AI Panel Overlay Backdrop
   ============================================ */
.ai-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  z-index: 499;
  display: none;
}

.ai-backdrop.active {
  display: block;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
  .right-sidebar {
    display: none;
  }
  
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .role-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .sidebar {
    position: fixed;
    left: -240px;
    top: 60px;
    z-index: 90;
    transition: left 0.2s;
    box-shadow: var(--shadow-lg);
  }
  
  .sidebar.mobile-open {
    left: 0;
  }
  
  .nav-center {
    display: none;
  }
  
  .product-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .ai-panel {
    width: 100%;
  }
  
  .docs-sidebar {
    display: none;
  }
  
  .docs-content {
    padding: var(--space-lg);
  }
  
  .business-profile {
    flex-direction: column;
    text-align: center;
  }
  
  .business-actions {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .role-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }
  
  .login-card {
    padding: var(--space-lg);
  }
  
  .signup-card {
    padding: var(--space-lg);
  }
  
  .top-nav {
    padding: 0 var(--space-md);
  }
  
  .nav-logo span {
    display: none;
  }
  
  .nav-security {
    display: none;
  }
  
  .notification-dropdown {
    width: 300px;
    right: -40px;
  }
  
  .signup-progress {
    overflow-x: auto;
  }
  
  .interest-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Sidebar toggle button (mobile)
   ============================================ */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--space-xs);
}

@media (max-width: 900px) {
  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ============================================
   Misc Utilities
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-secondary); }
.text-light { color: var(--text-light); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.hidden { display: none !important; }

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}
