/* ==========================================================================
   LMS MARKETPLACE - CORE DESIGN SYSTEM & FOUNDATION
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Brand Colors - Blue Theme */
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;
  --primary-subtle: rgba(37, 99, 235, 0.12);
  --primary-gradient: linear-gradient(135deg, #1E40AF 0%, #2563EB 50%, #3B82F6 100%);
  --primary-glow: 0 4px 14px rgba(37, 99, 235, 0.35);
  --accent: #F59E0B;
  --accent-light: #FEF3C7;
  --success: #16A34A;
  --success-light: #DCFCE7;
  --danger: #DC2626;
  --danger-light: #FEE2E2;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --info: #0284C7;
  --info-light: #E0F2FE;

  /* Bootstrap Variable Overrides */
  --bs-primary: #2563EB;
  --bs-primary-rgb: 37, 99, 235;
  --bs-primary-bg-subtle: #EFF6FF;
  --bs-primary-border-subtle: #BFDBFE;
  --bs-link-color: #2563EB;
  --bs-link-hover-color: #1D4ED8;
  --bs-focus-ring-color: rgba(37, 99, 235, 0.25);

  /* Neutrals */
  --background: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --text: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.8125rem;  /* 13px */
  --font-size-base: 0.9375rem;/* 15px */
  --font-size-md: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-h3: 1.375rem;   /* 22px */
  --font-size-h2: 1.875rem;   /* 30px */
  --font-size-h1: 2.375rem;   /* 38px */

  /* Spacing */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Elevation / Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--text);
  background-color: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Typography Hierarchy */
h1, .h1 {
  font-size: var(--font-size-h1);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

h2, .h2 {
  font-size: var(--font-size-h2);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}

h3, .h3 {
  font-size: var(--font-size-h3);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}

h4, .h4 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text);
}

h5, .h5 {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--text);
}

p {
  margin-bottom: 1rem;
  color: var(--text);
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-primary {
  color: var(--primary) !important;
}

.text-accent {
  color: var(--accent) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-white,
.text-white h1,
.text-white h2,
.text-white h3,
.text-white h4,
.text-white h5,
.text-white h6 {
  color: #FFFFFF !important;
}

.bg-primary.text-white h1,
.bg-primary.text-white h2,
.bg-primary.text-white h3,
.bg-primary.text-white h4,
.bg-primary.text-white h5,
.bg-primary.text-white h6,
.bg-dark.text-white h1,
.bg-dark.text-white h2,
.bg-dark.text-white h3,
.bg-dark.text-white h4,
.bg-dark.text-white h5,
.bg-dark.text-white h6 {
  color: #FFFFFF !important;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* Global Container & Layout Helpers */
.main-wrapper {
  flex: 1 0 auto;
}

.bg-surface {
  background-color: var(--surface) !important;
}

.bg-light-blue {
  background-color: var(--primary-light) !important;
}

.border-subtle {
  border-color: var(--border) !important;
}

.section-padding {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.section-title {
  margin-bottom: 2.5rem;
}

.section-subtitle {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

/* Global Demo Role Switcher Bar */
.demo-role-bar {
  background: #0F172A;
  color: #F8FAFC;
  font-size: 13px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1020;
}

@media (max-width: 991.98px) {
  .demo-role-bar {
    display: none !important;
  }
}

.demo-role-bar a {
  color: #94A3B8;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.demo-role-bar a:hover,
.demo-role-bar a.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.15);
}

.demo-role-bar .badge-role {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--primary);
  color: white;
}

/* Blue Theme Global Form Focus Rings */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
}
