/* ============================================
   ENHANCED BUTTON SYSTEM - 2025 DESIGN SYSTEM
   ============================================ */

/* CSS Custom Properties for Button System */
:root {
  /* Primary Button Colors */
  --btn-primary-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  --btn-primary-hover: linear-gradient(135deg, #4338ca 0%, #5b21b6 100%);
  --btn-primary-active: #3730a3;

  /* Secondary Button Colors */
  --btn-secondary-bg: #ffffff;
  --btn-secondary-border: #e2e8f0;
  --btn-secondary-hover-bg: #f8fafc;
  --btn-secondary-hover-border: #cbd5e1;

  /* Outline Button Colors */
  --btn-outline-border: #4f46e5;
  --btn-outline-color: #4f46e5;
  --btn-outline-hover-bg: #4f46e5;
  --btn-outline-hover-color: #ffffff;

  /* Button Shadows */
  --btn-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --btn-shadow-default: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --btn-shadow-hover: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

  /* Button Transitions */
  --btn-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   PRIMARY BUTTONS
   ============================================ */

.btn-primary-enhanced {
  position: relative;
  background: var(--btn-primary-gradient);
  border: none;
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  border-radius: 8px;
  box-shadow: var(--btn-shadow-default);
  transition: var(--btn-transition);
  overflow: hidden;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  user-select: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.btn-primary-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary-enhanced:hover {
  background: var(--btn-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--btn-shadow-hover);
}

.btn-primary-enhanced:hover::before {
  left: 100%;
}

.btn-primary-enhanced:active {
  background: var(--btn-primary-active);
  transform: translateY(0);
  box-shadow: var(--btn-shadow-sm);
  transition-duration: 0.1s;
}

.btn-primary-enhanced:focus {
  outline: none;
  box-shadow: var(--btn-shadow-default), 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-primary-enhanced:disabled,
.btn-primary-enhanced[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--btn-shadow-sm);
}

/* Sleek Header Button */
.btn-header-sleek {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
  color: #ffffff !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  gap: 0.5rem;
}

.btn-header-sleek:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35) !important;
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%) !important;
  color: #ffffff !important;
}

.btn-header-sleek::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-header-sleek:hover::after {
  left: 100%;
}

.btn-header-sleek:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2) !important;
}

.btn-header-sleek svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.btn-header-sleek:hover svg {
  transform: rotate(90deg);
}

[data-bs-theme="dark"] .btn-header-sleek {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
}

/* Sleek Secondary Header Button */
.btn-header-sleek-secondary {
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(4px) !important;
  color: #475569 !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-header-sleek-secondary:hover {
  background: rgba(255, 255, 255, 0.8) !important;
  color: #2563eb !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

[data-bs-theme="dark"] .btn-header-sleek-secondary {
  background: rgba(30, 41, 59, 0.5) !important;
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] .btn-header-sleek-secondary:hover {
  background: rgba(30, 41, 59, 0.8) !important;
  color: #60a5fa !important;
  border-color: rgba(96, 165, 250, 0.3) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}



.btn-primary-enhanced:disabled::before,
.btn-primary-enhanced[disabled]::before {
  display: none;
}

/* ============================================
   SECONDARY BUTTONS
   ============================================ */

.btn-secondary-enhanced {
  position: relative;
  background: var(--btn-secondary-bg);
  border: 2px solid var(--btn-secondary-border);
  color: #374151;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  border-radius: 8px;
  box-shadow: var(--btn-shadow-sm);
  transition: var(--btn-transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  user-select: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.btn-secondary-enhanced:hover {
  background: var(--btn-secondary-hover-bg);
  border-color: var(--btn-secondary-hover-border);
  color: #1f2937;
  transform: translateY(-1px);
  box-shadow: var(--btn-shadow-default);
}

.btn-secondary-enhanced:active {
  background: #f1f5f9;
  transform: translateY(0);
  box-shadow: var(--btn-shadow-sm);
  transition-duration: 0.1s;
}

.btn-secondary-enhanced:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: var(--btn-shadow-sm), 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-secondary-enhanced:disabled,
.btn-secondary-enhanced[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  background: var(--btn-secondary-bg);
  border-color: var(--btn-secondary-border);
  box-shadow: none;
}

/* ============================================
   OUTLINE BUTTONS
   ============================================ */

.btn-outline-enhanced {
  position: relative;
  background: transparent;
  border: 2px solid var(--btn-outline-border);
  color: var(--btn-outline-color);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  border-radius: 8px;
  box-shadow: none;
  transition: var(--btn-transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  user-select: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  overflow: hidden;
}

.btn-outline-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--btn-outline-hover-bg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.btn-outline-enhanced:hover {
  color: var(--btn-outline-hover-color);
  border-color: var(--btn-outline-hover-bg);
  transform: translateY(-1px);
  box-shadow: var(--btn-shadow-default);
}

.btn-outline-enhanced:hover::before {
  transform: scaleX(1);
}

.btn-outline-enhanced:active {
  transform: translateY(0);
  box-shadow: var(--btn-shadow-sm);
  transition-duration: 0.1s;
}

.btn-outline-enhanced:focus {
  outline: none;
  border-color: var(--btn-outline-hover-bg);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-outline-enhanced:disabled,
.btn-outline-enhanced[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  background: transparent;
  border-color: var(--btn-outline-border);
  color: var(--btn-outline-color);
  box-shadow: none;
}

.btn-outline-enhanced:disabled::before,
.btn-outline-enhanced[disabled]::before {
  display: none;
}

/* ============================================
   SIZE VARIANTS
   ============================================ */

/* Small Buttons */
.btn-primary-enhanced.btn-sm,
.btn-secondary-enhanced.btn-sm,
.btn-outline-enhanced.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 6px;
}

.btn-primary-enhanced.btn-sm,
.btn-secondary-enhanced.btn-sm,
.btn-outline-enhanced.btn-sm {
  min-height: 36px;
}

/* Large Buttons */
.btn-primary-enhanced.btn-lg,
.btn-secondary-enhanced.btn-lg,
.btn-outline-enhanced.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.125rem;
  border-radius: 10px;
}

.btn-primary-enhanced.btn-lg,
.btn-secondary-enhanced.btn-lg,
.btn-outline-enhanced.btn-lg {
  min-height: 52px;
}

/* Default Buttons */
.btn-primary-enhanced:not(.btn-sm):not(.btn-lg),
.btn-secondary-enhanced:not(.btn-sm):not(.btn-lg),
.btn-outline-enhanced:not(.btn-sm):not(.btn-lg) {
  padding: 0.75rem 1.5rem;
  min-height: 44px;
}

/* ============================================
   ICON SUPPORT
   ============================================ */

.btn-primary-enhanced .btn-icon,
.btn-secondary-enhanced .btn-icon,
.btn-outline-enhanced .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  width: 1.25rem;
  height: 1.25rem;
}

.btn-primary-enhanced .btn-icon:only-child,
.btn-secondary-enhanced .btn-icon:only-child,
.btn-outline-enhanced .btn-icon:only-child {
  margin-right: 0;
}

/* ============================================
   LOADING STATES
   ============================================ */

.btn-primary-enhanced.loading,
.btn-secondary-enhanced.loading,
.btn-outline-enhanced.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-primary-enhanced.loading::after,
.btn-secondary-enhanced.loading::after,
.btn-outline-enhanced.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1rem;
  margin: -0.5rem 0 0 -0.5rem;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: button-loading-spinner 1s ease-in-out infinite;
}

@keyframes button-loading-spinner {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

[data-bs-theme="dark"] {
  --btn-secondary-bg: #1f2937;
  --btn-secondary-border: #374151;
  --btn-secondary-hover-bg: #111827;
  --btn-secondary-hover-border: #4b5563;
}

/* ============================================
   ACCESSIBILITY & MOTION PREFERENCES
   ============================================ */

@media (prefers-reduced-motion: reduce) {

  .btn-primary-enhanced,
  .btn-secondary-enhanced,
  .btn-outline-enhanced {
    transition: none;
  }

  .btn-primary-enhanced::before {
    display: none;
  }

  .btn-outline-enhanced::before {
    transition: none;
  }

  .btn-primary-enhanced:hover,
  .btn-secondary-enhanced:hover,
  .btn-outline-enhanced:hover {
    transform: none;
  }

  .btn-primary-enhanced.loading::after,
  .btn-secondary-enhanced.loading::after,
  .btn-outline-enhanced.loading::after {
    animation: none;
  }
}

/* Focus visible for keyboard navigation */
.btn-primary-enhanced:focus-visible,
.btn-secondary-enhanced:focus-visible,
.btn-outline-enhanced:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-primary-enhanced {
    --btn-primary-gradient: #000000;
    --btn-primary-hover: #333333;
    --btn-primary-active: #666666;
  }

  .btn-secondary-enhanced {
    --btn-secondary-border: #000000;
    --btn-secondary-hover-border: #000000;
  }

  .btn-outline-enhanced {
    --btn-outline-border: #000000;
    --btn-outline-color: #000000;
    --btn-outline-hover-bg: #000000;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Full width buttons */
.btn-full-width {
  width: 100%;
}

/* Button groups */
.btn-group-enhanced .btn-primary-enhanced,
.btn-group-enhanced .btn-secondary-enhanced,
.btn-group-enhanced .btn-outline-enhanced {
  border-radius: 0;
  margin: 0;
}

.btn-group-enhanced .btn-primary-enhanced:first-child,
.btn-group-enhanced .btn-secondary-enhanced:first-child,
.btn-group-enhanced .btn-outline-enhanced:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.btn-group-enhanced .btn-primary-enhanced:last-child,
.btn-group-enhanced .btn-secondary-enhanced:last-child,
.btn-group-enhanced .btn-outline-enhanced:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* ============================================
   BACKWARD COMPATIBILITY
   ============================================ */

/* Override Bootstrap defaults for enhanced buttons */
.btn-primary-enhanced.btn,
.btn-secondary-enhanced.btn,
.btn-outline-enhanced.btn {
  border-radius: 8px;
}

/* Ensure enhanced buttons work with Bootstrap utilities */
.btn-primary-enhanced.btn-sm,
.btn-secondary-enhanced.btn-sm,
.btn-outline-enhanced.btn-sm {
  --bs-btn-padding-y: 0.5rem;
  --bs-btn-padding-x: 1rem;
  --bs-btn-font-size: 0.875rem;
}

.btn-primary-enhanced.btn-lg,
.btn-secondary-enhanced.btn-lg,
.btn-outline-enhanced.btn-lg {
  --bs-btn-padding-y: 0.75rem;
  --bs-btn-padding-x: 2rem;
  --bs-btn-font-size: 1.125rem;
}

/* ============================================
   BEAUTIFUL CARD SYSTEM - 2025 DESIGN SYSTEM
   ============================================ */

/* CSS Custom Properties for Card System */
:root {
  /* Card Base Colors */
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --card-shadow-default: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --card-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --card-shadow-active: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

  /* Card Transitions */
  --card-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Card Color Variants */
  --card-accent-tools: #4f46e5;
  --card-accent-assistants: #ec4899;
  --card-accent-assessment: #06b6d4;
  --card-accent-generator: #10b981;
}

/* ============================================
   BASE CARD STYLING
   ============================================ */

.beautiful-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--card-shadow-default);
  transition: var(--card-transition);
  cursor: pointer;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
}

.beautiful-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--card-accent-tools), var(--card-accent-tools));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.beautiful-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.beautiful-card:hover::before {
  opacity: 1;
}

.beautiful-card:active {
  transform: translateY(-2px) scale(0.98);
  box-shadow: var(--card-shadow-active);
  transition-duration: 0.1s;
}

/* ============================================
   CARD COLOR VARIANTS
   ============================================ */

/* Tools Card - Purple Accent */
.beautiful-card-tools {
  --card-accent-current: var(--card-accent-tools);
}

.beautiful-card-tools::before {
  background: linear-gradient(90deg, var(--card-accent-tools), #6366f1);
}

.beautiful-card-tools:hover {
  border-color: rgba(79, 70, 229, 0.2);
  box-shadow: var(--card-shadow-hover), 0 0 20px rgba(79, 70, 229, 0.1);
}

/* Assistants Card - Pink Accent */
.beautiful-card-assistants {
  --card-accent-current: var(--card-accent-assistants);
}

.beautiful-card-assistants::before {
  background: linear-gradient(90deg, var(--card-accent-assistants), #f472b6);
}

.beautiful-card-assistants:hover {
  border-color: rgba(236, 72, 153, 0.2);
  box-shadow: var(--card-shadow-hover), 0 0 20px rgba(236, 72, 153, 0.1);
}

/* Assessment Card - Cyan Accent */
.beautiful-card-assessment {
  --card-accent-current: var(--card-accent-assessment);
}

.beautiful-card-assessment::before {
  background: linear-gradient(90deg, var(--card-accent-assessment), #22d3ee);
}

.beautiful-card-assessment:hover {
  border-color: rgba(6, 182, 212, 0.2);
  box-shadow: var(--card-shadow-hover), 0 0 20px rgba(6, 182, 212, 0.1);
}

/* Generator Card - Green Accent */
.beautiful-card-generator {
  --card-accent-current: var(--card-accent-generator);
}

.beautiful-card-generator::before {
  background: linear-gradient(90deg, var(--card-accent-generator), #34d399);
}

.beautiful-card-generator:hover {
  border-color: rgba(16, 185, 129, 0.2);
  box-shadow: var(--card-shadow-hover), 0 0 20px rgba(16, 185, 129, 0.1);
}

/* ============================================
   CARD CONTENT STRUCTURE
   ============================================ */

.beautiful-card-content {
  position: relative;
  z-index: 1;
}

.beautiful-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--card-accent-current, #4f46e5);
  margin-bottom: 1rem;
  transition: var(--card-transition);
}

.beautiful-card:hover .beautiful-card-icon {
  transform: scale(1.1);
  background: rgba(79, 70, 229, 0.15);
}

.beautiful-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.beautiful-card-description {
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.beautiful-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #94a3b8;
}

.beautiful-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: rgba(79, 70, 229, 0.1);
  color: var(--card-accent-current, #4f46e5);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   CARD LAYOUT VARIANTS
   ============================================ */

/* Compact Card */
.beautiful-card-compact {
  padding: 1.5rem;
}

.beautiful-card-compact .beautiful-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
}

.beautiful-card-compact .beautiful-card-title {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.beautiful-card-compact .beautiful-card-description {
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}

/* Large Card */
.beautiful-card-large {
  padding: 2.5rem;
}

.beautiful-card-large .beautiful-card-icon {
  width: 4rem;
  height: 4rem;
  margin-bottom: 1.25rem;
}

.beautiful-card-large .beautiful-card-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.beautiful-card-large .beautiful-card-description {
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

/* ============================================
   CARD INTERACTION STATES
   ============================================ */

.beautiful-card:focus {
  outline: none;
  border-color: var(--card-accent-current, #4f46e5);
  box-shadow: var(--card-shadow-default), 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.beautiful-card.selected {
  border-color: var(--card-accent-current, #4f46e5);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.02) 0%, rgba(79, 70, 229, 0.05) 100%);
}

.beautiful-card.selected::before {
  opacity: 1;
}

.beautiful-card.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.beautiful-card.disabled:hover {
  transform: none;
  box-shadow: var(--card-shadow-default);
}

/* ============================================
   CARD ANIMATIONS & EFFECTS
   ============================================ */

/* Stagger animation for card grids */
.beautiful-card-grid .beautiful-card {
  animation: card-fade-in 0.6s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

.beautiful-card-grid .beautiful-card:nth-child(1) {
  animation-delay: 0.1s;
}

.beautiful-card-grid .beautiful-card:nth-child(2) {
  animation-delay: 0.2s;
}

.beautiful-card-grid .beautiful-card:nth-child(3) {
  animation-delay: 0.3s;
}

.beautiful-card-grid .beautiful-card:nth-child(4) {
  animation-delay: 0.4s;
}

.beautiful-card-grid .beautiful-card:nth-child(5) {
  animation-delay: 0.5s;
}

.beautiful-card-grid .beautiful-card:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes card-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse effect for important cards */
.beautiful-card-pulse {
  animation: card-pulse 2s infinite;
}

@keyframes card-pulse {

  0%,
  100% {
    box-shadow: var(--card-shadow-default);
  }

  50% {
    box-shadow: var(--card-shadow-default), 0 0 20px rgba(79, 70, 229, 0.2);
  }
}

/* ============================================
   RESPONSIVE CARD BEHAVIOR
   ============================================ */

@media (max-width: 768px) {
  .beautiful-card {
    padding: 1.5rem;
    border-radius: 12px;
  }

  .beautiful-card-compact {
    padding: 1.25rem;
  }

  .beautiful-card-large {
    padding: 2rem;
  }

  .beautiful-card-title {
    font-size: 1.125rem;
  }

  .beautiful-card-description {
    font-size: 0.8125rem;
  }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

[data-bs-theme="dark"] {
  --card-bg: #1f2937;
  --card-border: #374151;
  --card-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --card-shadow-default: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
  --card-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
  --card-shadow-active: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
}

[data-bs-theme="dark"] .beautiful-card-title {
  color: #f1f5f9;
}

[data-bs-theme="dark"] .beautiful-card-description {
  color: #cbd5e1;
}

[data-bs-theme="dark"] .beautiful-card-meta {
  color: #64748b;
}

/* ============================================
   ACCESSIBILITY & MOTION PREFERENCES
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .beautiful-card {
    transition: none;
  }

  .beautiful-card::before {
    transition: none;
  }

  .beautiful-card:hover {
    transform: none;
  }

  .beautiful-card:active {
    transform: none;
  }

  .beautiful-card-icon {
    transition: none;
  }

  .beautiful-card:hover .beautiful-card-icon {
    transform: none;
  }

  .beautiful-card-grid .beautiful-card {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .beautiful-card-pulse {
    animation: none;
  }
}

/* Focus visible for keyboard navigation */
.beautiful-card:focus-visible {
  outline: 2px solid var(--card-accent-current, #4f46e5);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .beautiful-card {
    border-width: 2px;
  }

  .beautiful-card::before {
    height: 6px;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Card grid layouts */
.beautiful-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.beautiful-card-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.beautiful-card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.beautiful-card-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Card aspect ratios */
.beautiful-card-square {
  aspect-ratio: 1 / 1;
}

.beautiful-card-wide {
  aspect-ratio: 16 / 9;
}

/* Card alignment utilities */
.beautiful-card-center {
  text-align: center;
}

.beautiful-card-left {
  text-align: left;
}

.beautiful-card-right {
  text-align: right;
}

/* ============================================
   BACKWARD COMPATIBILITY
   ============================================ */

/* Override Bootstrap card defaults */
.beautiful-card.card {
  border-radius: 16px;
  box-shadow: var(--card-shadow-default);
}

.beautiful-card.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

/* ============================================
   MODERN FORM ELEMENTS - 2025 DESIGN SYSTEM
   ============================================ */

/* CSS Custom Properties for Form Elements */
:root {
  /* Form Colors */
  --form-border-color: #e2e8f0;
  --form-border-focus: #4f46e5;
  --form-border-error: #ef4444;
  --form-border-success: #10b981;
  --form-bg: #ffffff;
  --form-bg-disabled: #f8fafc;
  --form-text: #0f172a;
  --form-text-muted: #64748b;
  --form-text-placeholder: #94a3b8;

  /* Form Spacing */
  --form-padding: 0.75rem 1rem;
  --form-padding-sm: 0.5rem 0.75rem;
  --form-padding-lg: 1rem 1.25rem;

  /* Form Borders */
  --form-border-width: 2px;
  --form-border-radius: 12px;
  --form-focus-ring: 0 0 0 3px rgba(79, 70, 229, 0.1);

  /* Form Shadows */
  --form-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --form-shadow-focus: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

  /* Form Transitions */
  --form-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  /* Label Styling */
  --label-font-weight: 600;
  --label-letter-spacing: 0.05em;
  --label-text-transform: uppercase;
  --label-font-size: 0.875rem;
  --label-margin-bottom: 0.5rem;
}

/* ============================================
   FORM BASE STYLES
   ============================================ */

/* Form Group */
.form-group-modern {
  margin-bottom: 1.5rem;
}

.form-group-modern:last-child {
  margin-bottom: 0;
}

/* Form Labels */
.form-label-modern {
  display: block;
  font-weight: var(--label-font-weight);
  font-size: var(--label-font-size);
  letter-spacing: var(--label-letter-spacing);
  text-transform: var(--label-text-transform);
  color: var(--form-text);
  margin-bottom: var(--label-margin-bottom);
  transition: var(--form-transition);
}

.form-label-modern.required::after {
  content: " *";
  color: var(--form-border-error);
}

/* Form Controls Base */
.form-control-modern {
  width: 100%;
  padding: var(--form-padding);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--form-text);
  background-color: var(--form-bg);
  border: var(--form-border-width) solid var(--form-border-color);
  border-radius: var(--form-border-radius);
  box-shadow: var(--form-shadow);
  transition: var(--form-transition);
  font-family: inherit;
}

.form-control-modern:focus {
  outline: none;
  border-color: var(--form-border-focus);
  box-shadow: var(--form-shadow-focus), var(--form-focus-ring);
}

.form-control-modern:hover:not(:focus) {
  border-color: #cbd5e1;
}

.form-control-modern::placeholder {
  color: var(--form-text-placeholder);
  opacity: 1;
}

.form-control-modern:disabled,
.form-control-modern[readonly] {
  background-color: var(--form-bg-disabled);
  border-color: #e2e8f0;
  color: var(--form-text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

/* ============================================
   INPUT VARIANTS
   ============================================ */

/* All input variants inherit from .form-control-modern */
.form-input-modern,
.form-email-modern,
.form-password-modern,
.form-number-modern,
.form-url-modern,
.form-tel-modern {
  /* Shared styling - inherits from .form-control-modern */
  width: 100%;
}

/* Search Input */
.form-search-modern {
  /* Inherits from .form-control-modern */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.5rem 1.5rem;
  padding-right: 3rem;
}

/* ============================================
   TEXTAREA
   ============================================ */

.form-textarea-modern {
  /* Inherits from .form-control-modern */
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.form-textarea-modern:focus {
  min-height: 140px;
}

/* ============================================
   SELECT ELEMENTS
   ============================================ */

.form-select-modern {
  /* Inherits from .form-control-modern */
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.5rem 1.5rem;
  padding-right: 3rem;
  cursor: pointer;
}

.form-select-modern:focus {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%234f46e5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
}

/* ============================================
   CHECKBOXES AND RADIO BUTTONS
   ============================================ */

/* Checkbox Container */
.form-check-modern {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.form-check-modern:last-child {
  margin-bottom: 0;
}

/* Hidden Checkbox Input */
.form-check-input-modern {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Custom Checkbox */
.form-check-input-modern+.form-check-label-modern::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--form-border-color);
  border-radius: 4px;
  background-color: var(--form-bg);
  transition: var(--form-transition);
  flex-shrink: 0;
  margin-right: 0.5rem;
  position: relative;
  top: 2px;
}

/* Checked State */
.form-check-input-modern:checked+.form-check-label-modern::before {
  background-color: var(--form-border-focus);
  border-color: var(--form-border-focus);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3e%3cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3e%3c/svg%3e");
  background-size: 14px 14px;
  background-repeat: no-repeat;
  background-position: center;
}

/* Focus State */
.form-check-input-modern:focus+.form-check-label-modern::before {
  box-shadow: var(--form-focus-ring);
  border-color: var(--form-border-focus);
}

/* Hover State */
.form-check-input-modern:not(:checked)+.form-check-label-modern:hover::before {
  border-color: #cbd5e1;
  background-color: #f8fafc;
}

/* Disabled State */
.form-check-input-modern:disabled+.form-check-label-modern {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-check-input-modern:disabled+.form-check-label-modern::before {
  background-color: var(--form-bg-disabled);
  border-color: #e2e8f0;
  cursor: not-allowed;
}

/* Checkbox Label */
.form-check-label-modern {
  font-weight: 400;
  font-size: 1rem;
  color: var(--form-text);
  line-height: 1.5;
  cursor: pointer;
  margin-bottom: 0;
  display: flex;
  align-items: flex-start;
}

.form-check-input-modern:disabled+.form-check-label-modern {
  cursor: not-allowed;
}

/* ============================================
   RADIO BUTTONS
   ============================================ */

/* Custom Radio */
.form-check-input-modern[type="radio"]+.form-check-label-modern::before {
  border-radius: 50%;
  width: 20px;
  height: 20px;
}

/* Radio Checked State */
.form-check-input-modern[type="radio"]:checked+.form-check-label-modern::before {
  background-color: var(--form-bg);
  border-color: var(--form-border-focus);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%234f46e5'%3e%3ccircle cx='10' cy='10' r='4'/%3e%3c/svg%3e");
  background-size: 8px 8px;
  background-repeat: no-repeat;
  background-position: center;
}

/* ============================================
   FORM VALIDATION STATES
   ============================================ */

/* Error State */
.form-control-modern.is-invalid {
  border-color: var(--form-border-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-control-modern.is-invalid:focus {
  border-color: var(--form-border-error);
  box-shadow: var(--form-shadow-focus), 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Success State */
.form-control-modern.is-valid {
  border-color: var(--form-border-success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-control-modern.is-valid:focus {
  border-color: var(--form-border-success);
  box-shadow: var(--form-shadow-focus), 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Validation Feedback */
.form-feedback-modern {
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.5rem;
  display: block;
}

.form-feedback-modern.text-error {
  color: var(--form-border-error);
}

.form-feedback-modern.text-success {
  color: var(--form-border-success);
}

.form-feedback-modern.text-warning {
  color: #f59e0b;
}

/* ============================================
   FORM SIZE VARIANTS
   ============================================ */

/* Small Forms */
.form-control-modern.form-control-sm {
  padding: var(--form-padding-sm);
  font-size: 0.875rem;
  border-radius: 8px;
}

.form-label-modern.form-label-sm {
  font-size: 0.75rem;
  margin-bottom: 0.375rem;
}

/* Large Forms */
.form-control-modern.form-control-lg {
  padding: var(--form-padding-lg);
  font-size: 1.125rem;
  border-radius: 16px;
}

.form-label-modern.form-label-lg {
  font-size: 1rem;
  margin-bottom: 0.625rem;
}

/* ============================================
   FORM LAYOUTS
   ============================================ */

/* Inline Forms */
.form-inline-modern {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.form-inline-modern .form-group-modern {
  margin-bottom: 0;
  flex: 1;
  min-width: 200px;
}

/* Horizontal Forms */
.form-horizontal-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-horizontal-modern .form-group-modern {
  flex: 1;
  min-width: 250px;
}

/* Form Row */
.form-row-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row-modern:last-child {
  margin-bottom: 0;
}

.form-row-modern .form-group-modern {
  flex: 1;
  min-width: 200px;
}

/* ============================================
   SPECIAL FORM ELEMENTS
   ============================================ */

/* Form Fieldset */
.form-fieldset-modern {
  border: 2px solid var(--form-border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background-color: #fafbfc;
}

.form-fieldset-modern legend {
  font-weight: 600;
  font-size: 1rem;
  color: var(--form-text);
  padding: 0 0.75rem;
  margin-left: 1rem;
  background-color: #fafbfc;
  border-radius: 8px;
}

/* Form Help Text */
.form-help-modern {
  font-size: 0.875rem;
  color: var(--form-text-muted);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* Form Divider */
.form-divider-modern {
  height: 1px;
  background-color: var(--form-border-color);
  margin: 1.5rem 0;
  border: none;
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
  :root {
    --form-border-color: #374151;
    --form-bg: #1f2937;
    --form-bg-disabled: #111827;
    --form-text: #f9fafb;
    --form-text-muted: #9ca3af;
    --form-text-placeholder: #6b7280;
  }

  .form-fieldset-modern {
    background-color: #111827;
    border-color: #374151;
  }

  .form-fieldset-modern legend {
    background-color: #111827;
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Mobile Optimizations */
@media (max-width: 767.98px) {
  .form-control-modern {
    font-size: 16px;
    /* Prevents zoom on iOS */
  }

  .form-inline-modern {
    flex-direction: column;
    align-items: stretch;
  }

  .form-inline-modern .form-group-modern {
    min-width: auto;
  }

  .form-horizontal-modern {
    flex-direction: column;
  }

  .form-row-modern {
    flex-direction: column;
  }

  .form-fieldset-modern {
    padding: 1rem;
  }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Focus Visible */
.form-control-modern:focus-visible {
  outline: none;
  border-color: var(--form-border-focus);
  box-shadow: var(--form-shadow-focus), var(--form-focus-ring);
}

.form-check-input-modern:focus-visible+.form-check-label-modern::before {
  box-shadow: var(--form-focus-ring);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .form-control-modern {
    border-width: 3px;
  }

  .form-check-input-modern+.form-check-label-modern::before {
    border-width: 3px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  .form-control-modern,
  .form-check-input-modern+.form-check-label-modern::before {
    transition: none;
  }
}

/* ============================================
   BACKWARD COMPATIBILITY
   ============================================ */

/* Override Bootstrap form defaults */
.form-control {
  border-radius: var(--form-border-radius);
  border-color: var(--form-border-color);
  box-shadow: var(--form-shadow);
}

.form-control:focus {
  border-color: var(--form-border-focus);
  box-shadow: var(--form-shadow-focus), var(--form-focus-ring);
}

.form-select {
  border-radius: var(--form-border-radius);
  border-color: var(--form-border-color);
  box-shadow: var(--form-shadow);
}

.form-check-input {
  width: 20px;
  height: 20px;
  margin-top: 0;
  border-radius: 4px;
}

.form-check-input:checked {
  background-color: var(--form-border-focus);
  border-color: var(--form-border-focus);
}

/* ============================================
   ADVANCED SIDEBAR NAVIGATION - 2025 DESIGN SYSTEM
   ============================================ */

/* CSS Custom Properties for Sidebar */
:root {
  /* Sidebar Dimensions */
  --sidebar-width: 280px;
  --sidebar-width-mobile: 85vw;
  --sidebar-width-tablet: 320px;
  --sidebar-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Sidebar Colors */
  --sidebar-bg: #ffffff;
  --sidebar-bg-dark: #1f2937;
  --sidebar-border: #e2e8f0;
  --sidebar-border-dark: #374151;
  --sidebar-text: #0f172a;
  --sidebar-text-muted: #64748b;
  --sidebar-text-dark: #f9fafb;
  --sidebar-text-muted-dark: #9ca3af;

  /* Sidebar Navigation */
  --nav-item-height: 48px;
  --nav-item-padding: 0.75rem 1rem;
  --nav-item-border-radius: 8px;
  --nav-item-margin: 0.25rem 0.75rem;
  --nav-item-hover-bg: #f8fafc;
  --nav-item-active-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  --nav-item-active-accent: #ffffff;

  /* Sidebar Shadows */
  --sidebar-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --sidebar-shadow-mobile: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Credits Section */
  --credits-bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --credits-border: #cbd5e1;
  --credits-progress-bg: #e2e8f0;
  --credits-progress-fill: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

/* ============================================
   SIDEBAR BASE STRUCTURE
   ============================================ */

/* Main Sidebar Container */
.sidebar-modern {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: var(--sidebar-shadow);
  transition: var(--sidebar-transition);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Sidebar Header */
.sidebar-header-modern {
  padding: 1.5rem;
  border-bottom: 1px solid var(--sidebar-border);
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.sidebar-logo-modern {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--sidebar-text);
  text-decoration: none;
}

.sidebar-logo-icon-modern {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.125rem;
}

/* Sidebar Navigation */
.sidebar-nav-modern {
  flex: 1;
  padding: 1rem 0;
}

.sidebar-nav-list-modern {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-nav-item-modern {
  margin: var(--nav-item-margin);
}

.sidebar-nav-link-modern {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: var(--nav-item-padding);
  height: var(--nav-item-height);
  border-radius: var(--nav-item-border-radius);
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--sidebar-transition);
  position: relative;
  overflow: hidden;
}

.sidebar-nav-link-modern:hover {
  background-color: var(--nav-item-hover-bg);
  color: var(--sidebar-text);
  transform: translateX(4px);
}

.sidebar-nav-link-modern.active {
  background: var(--nav-item-active-gradient);
  color: var(--nav-item-active-accent);
  box-shadow: 0 4px 6px -1px rgb(79, 70, 229, 0.2), 0 2px 4px -2px rgb(79, 70, 229, 0.2);
}

.sidebar-nav-link-modern.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background-color: var(--nav-item-active-accent);
  border-radius: 0 2px 2px 0;
}

.sidebar-nav-icon-modern {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.8;
  transition: var(--sidebar-transition);
}

.sidebar-nav-link-modern:hover .sidebar-nav-icon-modern,
.sidebar-nav-link-modern.active .sidebar-nav-icon-modern {
  opacity: 1;
}

.sidebar-nav-text-modern {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav-badge-modern {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Sidebar Footer / Credits Section */
.sidebar-footer-modern {
  padding: 1.5rem;
  border-top: 1px solid var(--sidebar-border);
  background: var(--credits-bg-gradient);
}

.credits-section-modern {
  background: white;
  border: 1px solid var(--credits-border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.credits-header-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.credits-title-modern {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sidebar-text);
  margin: 0;
}

.credits-upgrade-modern {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  text-decoration: none;
  transition: var(--sidebar-transition);
}

.credits-upgrade-modern:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgb(245, 158, 11, 0.3);
}

.credits-progress-modern {
  margin-bottom: 0.5rem;
}

.credits-progress-bar-modern {
  width: 100%;
  height: 8px;
  background-color: var(--credits-progress-bg);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.credits-progress-fill-modern {
  height: 100%;
  background: var(--credits-progress-fill);
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
}

.credits-progress-fill-modern::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.credits-stats-modern {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--sidebar-text-muted);
  margin-bottom: 0.25rem;
}

.credits-plan-modern {
  font-size: 0.75rem;
  color: var(--sidebar-text-muted);
  margin: 0;
}

/* ============================================
   MOBILE SIDEBAR OVERLAY
   ============================================ */

/* Mobile Overlay */
.sidebar-overlay-modern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1049;
  opacity: 0;
  visibility: hidden;
  transition: var(--sidebar-transition);
}

.sidebar-overlay-modern.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Sidebar */
.sidebar-modern.mobile {
  transform: translateX(-100%);
  width: var(--sidebar-width-mobile);
  max-width: var(--sidebar-width-tablet);
  box-shadow: var(--sidebar-shadow-mobile);
}

.sidebar-modern.mobile.active {
  transform: translateX(0);
}

/* Mobile Toggle Button */
.sidebar-toggle-modern {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1060;
  width: 48px;
  height: 48px;
  background: var(--sidebar-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: 12px;
  box-shadow: var(--sidebar-shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--sidebar-transition);
}

.sidebar-toggle-modern:hover {
  background: var(--nav-item-hover-bg);
  transform: scale(1.05);
}

.sidebar-toggle-icon-modern {
  width: 20px;
  height: 20px;
  position: relative;
}

.sidebar-toggle-icon-modern::before,
.sidebar-toggle-icon-modern::after,
.sidebar-toggle-icon-modern span {
  content: "";
  position: absolute;
  width: 20px;
  height: 2px;
  background-color: var(--sidebar-text);
  border-radius: 1px;
  transition: var(--sidebar-transition);
}

.sidebar-toggle-icon-modern::before {
  top: 6px;
}

.sidebar-toggle-icon-modern span {
  top: 14px;
}

.sidebar-toggle-icon-modern::after {
  bottom: 6px;
}

/* Hamburger Animation */
.sidebar-toggle-modern.active .sidebar-toggle-icon-modern::before {
  transform: rotate(45deg) translate(6px, 6px);
}

.sidebar-toggle-modern.active .sidebar-toggle-icon-modern span {
  opacity: 0;
}

.sidebar-toggle-modern.active .sidebar-toggle-icon-modern::after {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet Styles */
@media (max-width: 991.98px) {
  .sidebar-modern {
    width: var(--sidebar-width-tablet);
    transform: translateX(-100%);
  }

  .sidebar-modern.active {
    transform: translateX(0);
  }

  .sidebar-toggle-modern {
    display: flex;
  }
}

/* Mobile Styles */
@media (max-width: 767.98px) {
  .sidebar-modern {
    width: var(--sidebar-width-mobile);
  }

  .sidebar-nav-link-modern {
    padding: 1rem;
    height: auto;
    min-height: var(--nav-item-height);
  }

  .sidebar-nav-icon-modern {
    width: 24px;
    height: 24px;
  }

  .sidebar-header-modern {
    padding: 1rem;
  }

  .sidebar-footer-modern {
    padding: 1rem;
  }

  .credits-section-modern {
    padding: 0.75rem;
  }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
  .sidebar-modern {
    width: 90vw;
  }

  .sidebar-nav-link-modern {
    font-size: 1rem;
    padding: 1.25rem 1rem;
  }

  .sidebar-nav-badge-modern {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    height: 24px;
  }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
  :root {
    --sidebar-bg: var(--sidebar-bg-dark);
    --sidebar-border: var(--sidebar-border-dark);
    --sidebar-text: var(--sidebar-text-dark);
    --sidebar-text-muted: var(--sidebar-text-muted-dark);
    --nav-item-hover-bg: #374151;
  }

  .sidebar-header-modern {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  }

  .sidebar-footer-modern {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  }

  .credits-section-modern {
    background: var(--sidebar-bg-dark);
    border-color: var(--sidebar-border-dark);
  }

  .sidebar-toggle-modern {
    background: var(--sidebar-bg-dark);
    border-color: var(--sidebar-border-dark);
  }

  .sidebar-toggle-icon-modern::before,
  .sidebar-toggle-icon-modern::after,
  .sidebar-toggle-icon-modern span {
    background-color: var(--sidebar-text-dark);
  }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Focus Management */
.sidebar-nav-link-modern:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

.sidebar-toggle-modern:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .sidebar-nav-link-modern {
    border: 2px solid transparent;
  }

  .sidebar-nav-link-modern:hover,
  .sidebar-nav-link-modern:focus-visible {
    border-color: var(--sidebar-text);
  }

  .sidebar-nav-link-modern.active {
    border-color: var(--nav-item-active-accent);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  .sidebar-modern,
  .sidebar-overlay-modern,
  .sidebar-nav-link-modern,
  .sidebar-toggle-modern,
  .credits-upgrade-modern {
    transition: none;
  }

  .credits-progress-fill-modern::after {
    animation: none;
  }
}

/* ============================================
   ANIMATION ENHANCEMENTS
   ============================================ */

/* Stagger Animation for Nav Items */
.sidebar-nav-list-modern .sidebar-nav-item-modern {
  animation: slideInFromLeft 0.3s ease-out forwards;
  opacity: 0;
  transform: translateX(-20px);
}

.sidebar-nav-list-modern .sidebar-nav-item-modern:nth-child(1) {
  animation-delay: 0.1s;
}

.sidebar-nav-list-modern .sidebar-nav-item-modern:nth-child(2) {
  animation-delay: 0.15s;
}

.sidebar-nav-list-modern .sidebar-nav-item-modern:nth-child(3) {
  animation-delay: 0.2s;
}

.sidebar-nav-list-modern .sidebar-nav-item-modern:nth-child(4) {
  animation-delay: 0.25s;
}

.sidebar-nav-list-modern .sidebar-nav-item-modern:nth-child(5) {
  animation-delay: 0.3s;
}

.sidebar-nav-list-modern .sidebar-nav-item-modern:nth-child(6) {
  animation-delay: 0.35s;
}

.sidebar-nav-list-modern .sidebar-nav-item-modern:nth-child(7) {
  animation-delay: 0.4s;
}

.sidebar-nav-list-modern .sidebar-nav-item-modern:nth-child(8) {
  animation-delay: 0.45s;
}

@keyframes slideInFromLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   BACKWARD COMPATIBILITY
   ============================================ */

/* Override existing sidebar styles */
.sidebar {
  border-radius: 0;
  box-shadow: none;
}

.sidebar .nav-link {
  border-radius: var(--nav-item-border-radius);
  transition: var(--sidebar-transition);
}

.sidebar .nav-link:hover {
  background-color: var(--nav-item-hover-bg);
}

/* ============================================
   MODERN DASHBOARD SYSTEM - 2025 DESIGN SYSTEM
   ============================================ */

/* CSS Custom Properties for Dashboard */
:root {
  /* Dashboard Colors */
  --dashboard-bg: #f8fafc;
  --dashboard-bg-dark: #0f172a;
  --welcome-gradient: linear-gradient(135deg, var(--color-primary, #1e1b4b) 0%, var(--color-accent, #4f46e5) 100%);
  --welcome-gradient-dark: linear-gradient(135deg, #312e81 0%, #4f46e5 100%);

  /* Dashboard Card Colors */
  --dashboard-card-bg: #ffffff;
  --dashboard-card-border: #e2e8f0;
  --dashboard-card-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --dashboard-card-shadow-hover: 0 10px 25px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Main Dashboard Container */
.dashboard-main,
.main {
  background-color: var(--dashboard-bg);
  min-height: 100vh;
}

[data-bs-theme="dark"] .dashboard-main,
[data-bs-theme="dark"] .main {
  background: transparent !important;
  background-color: var(--dashboard-bg-dark) !important;
}

/* ============================================
   WELCOME SECTION
   ============================================ */

.welcome-section {
  background: var(--welcome-gradient);
  border-radius: 20px;
  padding: 2.5rem;
  color: white;
  margin-bottom: 2rem;
  box-shadow: 0 10px 40px -10px rgba(79, 70, 229, 0.4);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mesh Gradient Effect */
.welcome-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(129, 140, 248, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(96, 165, 250, 0.1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(79, 70, 229, 0.15) 0px, transparent 50%);
  z-index: 0;
  pointer-events: none;
}


.welcome-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.welcome-section h2 {
  color: white !important;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.welcome-section p {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 0;
  max-width: 800px;
  position: relative;
  z-index: 1;
}

[data-bs-theme="dark"] .welcome-section {
  background: var(--welcome-gradient-dark);
  box-shadow: 0 10px 40px -10px rgba(99, 102, 241, 0.3);
}

/* Header Logo Styling */
.navbar-brand-text {
  background: linear-gradient(135deg, #0f172a 0%, #4338ca 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  font-weight: 800 !important;
  font-size: 1.4rem !important;
  letter-spacing: -0.04em !important;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .navbar-brand-text {
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
}



/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
  margin-bottom: 1.5rem;
}

.section-header h4 {
  color: #0f172a;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0;
  position: relative;
  display: inline-block;
}

.section-header h4::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  border-radius: 2px;
}

[data-bs-theme="dark"] .section-header h4 {
  color: #f1f5f9;
}

/* ============================================
   DASHBOARD CARDS
   ============================================ */

.dashboard-card {
  background-color: var(--dashboard-card-bg);
  border: 1px solid var(--dashboard-card-border);
  border-radius: 16px;
  box-shadow: var(--dashboard-card-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  overflow: hidden;
  position: relative;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dashboard-card:hover {
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12), var(--dashboard-card-shadow-hover);
  transform: translateY(-5px);
}

.dashboard-card:hover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.4) 0%, transparent 40%);
  pointer-events: none;
  z-index: 1;
}

.dashboard-card:hover::before {
  opacity: 1;
}


[data-bs-theme="dark"] .dashboard-card {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .dashboard-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.15);
}

/* Card Badge */
.card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

.badge-template {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.025em;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
  transition: all 0.3s ease;
}

.badge-assistant {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.025em;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  transition: all 0.3s ease;
}

.dashboard-card:hover .badge-template {
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
  transform: translateY(-1px);
}

.dashboard-card:hover .badge-assistant {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

[data-bs-theme="dark"] .badge-template {
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
}

[data-bs-theme="dark"] .badge-assistant {
  background: linear-gradient(135deg, #34d399 0%, #6ee7b7 100%);
}

/* Card Content */
.dashboard-card .card-body {
  padding: 1.5rem;
  padding-top: 3.5rem;
}

.dashboard-card h5 {
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}

.dashboard-card p {
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 0;
}

[data-bs-theme="dark"] .dashboard-card h5 {
  color: #f1f5f9;
}

[data-bs-theme="dark"] .dashboard-card p {
  color: #94a3b8;
}

/* Card hover title effect */
.text-decoration-none:hover .dashboard-card h5 {
  color: #4f46e5;
}

[data-bs-theme="dark"] .text-decoration-none:hover .dashboard-card h5 {
  color: #818cf8;
}

/* ============================================
   STAGGERED CARD ANIMATIONS
   ============================================ */

.row.g-4>[class*="col-"]:has(.dashboard-card) {
  animation: dashboardCardFadeIn 0.6s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

.row.g-4>[class*="col-"]:nth-child(1) {
  animation-delay: 0.1s;
}

.row.g-4>[class*="col-"]:nth-child(2) {
  animation-delay: 0.15s;
}

.row.g-4>[class*="col-"]:nth-child(3) {
  animation-delay: 0.2s;
}

.row.g-4>[class*="col-"]:nth-child(4) {
  animation-delay: 0.25s;
}

.row.g-4>[class*="col-"]:nth-child(5) {
  animation-delay: 0.3s;
}

.row.g-4>[class*="col-"]:nth-child(6) {
  animation-delay: 0.35s;
}

.row.g-4>[class*="col-"]:nth-child(7) {
  animation-delay: 0.4s;
}

.row.g-4>[class*="col-"]:nth-child(8) {
  animation-delay: 0.45s;
}

@keyframes dashboardCardFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   EMPTY STATE WITH GLASSMORPHISM
   ============================================ */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border: 2px dashed #cbd5e1;
  border-radius: 20px;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

.empty-state::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(79, 70, 229, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  color: #94a3b8;
  padding: 1.25rem;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

/* ============================================
   TEACHING PLAN SYSTEM - 2025 DESIGN
   ============================================ */

/* TP Dashboard Header & Hero Text */
.tp-header {
  margin-bottom: 3rem;
}

.tp-header h2 {
  font-size: 2.75rem;
  font-weight: 900;
  background: linear-gradient(135deg, #0f172a 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  letter-spacing: -0.04em;
}

[data-bs-theme="dark"] .tp-header h2 {
  background: linear-gradient(135deg, #f8fafc 0%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
}


/* TP Tutorial Box (Hero CTA Styles) - Sleek Refinement */
.tp-tutorial-box {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 32px;
  padding: 3.5rem 4rem;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  gap: 3.5rem;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.tp-tutorial-box h4,
.tp-tutorial-box h2,
.tp-tutorial-box p {
  color: #ffffff !important;
}


.tp-tutorial-box::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  filter: blur(40px);
}

.tp-tutorial-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.tp-tutorial-box:hover .tp-tutorial-icon {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.tp-btn-watch {
  background: #ffffff !important;
  color: #6366f1 !important;
  padding: 1.1rem 2.75rem !important;
  border-radius: 18px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  border: none !important;
}

.tp-btn-watch:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}




/* TP List Cards - Sleek & Professional */
.tp-card-list {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.7);
  padding: 1.25rem 2rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.tp-card-list:hover {
  border-color: #6366f1;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.06);
  background: #fcfdfe;
}

.tp-card-icon-wrapper-sm {
  width: 44px;
  height: 44px;
  background: #f1f5f9;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.tp-card-list:hover .tp-card-icon-wrapper-sm {
  background: #6366f1;
  color: #ffffff;
}

.tp-card {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 2.25rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
}

.tp-card:hover {
  border-color: #6366f1;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}



.tp-card-info {
  flex: 1;
  min-width: 0;
}


/* TP Multi-Step Progress Headers */
.tp-step-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  border: 1px solid rgba(241, 245, 249, 0.8);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.02),
    0 10px 15px -3px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.tp-step-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.02) 0%, transparent 70%);
}

.tp-progress-bar-container {
  height: 10px;
  background: #f1f5f9;
  border-radius: 20px;
  overflow: hidden;
  margin-top: 1.25rem;
}

.tp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 20px;
  transition: width 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

/* TP Multi-Step Form Layout Cards */
.tp-form-card {
  background: #ffffff;
  border-radius: 32px;
  padding: 4rem;
  box-shadow:
    0 15px 35px -5px rgba(0, 0, 0, 0.04),
    0 30px 60px -15px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(241, 245, 249, 0.8);
  margin-bottom: 4rem;
  position: relative;
}

/* Review Phase Cards (Step 9) */
.tp-review-section {
  padding: 2.5rem;
  background: #ffffff;
  border-radius: 24px;
  margin-bottom: 2.5rem;
  border: 1px solid rgba(241, 245, 249, 1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  position: relative;
}

.tp-review-section:hover {
  border-color: #cbd5e1;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
  transform: translateY(-4px);
}

/* Premium Form Elements */
.tp-form-label {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #1e293b;
  margin-bottom: 0.75rem;
  display: block;
}

.tp-input {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 1rem 1.5rem !important;
  font-size: 1rem !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  color: #0f172a !important;
}

.tp-input:focus {
  background: #ffffff !important;
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12) !important;
  transform: translateY(-1px);
}

/* Dark Mode Overrides - Perfected Contrast */
[data-bs-theme="dark"] .tp-card,
[data-bs-theme="dark"] .tp-step-card,
[data-bs-theme="dark"] .tp-review-section,
[data-bs-theme="dark"] .tp-form-card {
  background: #111111;
  border-color: #222222;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .tp-card:hover,
[data-bs-theme="dark"] .tp-review-section:hover {
  border-color: #333333;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .tp-card-icon-wrapper {
  background: #1c1c1c;
  border-color: #2a2a2a;
}

[data-bs-theme="dark"] .tp-input {
  background: #0a0a0a !important;
  border-color: #222222 !important;
  color: #eeeeee !important;
}

[data-bs-theme="dark"] .tp-form-label {
  color: #cbd5e1;
}

/* Functional UI Components Restored & Upgraded */

/* Modern Premium Checkbox */
.tp-checkbox {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.tp-checkbox:hover {
  background: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
  transform: translateX(4px);
}

.tp-checkbox-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.tp-checkbox-mark {
  width: 24px;
  height: 24px;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tp-checkbox-mark::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46);
}

.tp-checkbox-input:checked~.tp-checkbox-mark {
  background: #4f46e5;
  border-color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.tp-checkbox-input:checked~.tp-checkbox-mark::after {
  opacity: 1;
  transform: scale(1);
}

.tp-checkbox-input:checked~.tp-checkbox-label {
  color: #0f172a;
  font-weight: 700;
}

/* TP Multi-Step Accordion (Competencies) */
.tp-accordion {
  border: 1px solid rgba(241, 245, 249, 0.8);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 2rem;
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.tp-accordion-header {
  padding: 1.5rem 2rem;
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.tp-accordion-header:hover {
  background: #f1f5f9;
}

.tp-accordion-header span {
  font-weight: 800;
  color: #1e293b;
  font-size: 1.05rem;
}

.tp-accordion-content {
  padding: 2rem;
  display: none;
  background: #ffffff;
}

.tp-accordion-content.active {
  display: block;
}

/* TP Competency List Item */
.tp-competency-item {
  padding: 1.5rem;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 18px;
  margin-bottom: 1.25rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tp-competency-item:hover {
  transform: translateX(10px);
  border-color: rgba(79, 70, 229, 0.2);
  background: #ffffff;
  box-shadow: 0 15px 30px -10px rgba(79, 70, 229, 0.1);
}

/* TP Rubric Levels (Step 8) */
.tp-rubric-card {
  padding: 2.5rem;
  border-radius: 24px;
  border: 1px solid rgba(241, 245, 249, 0.8);
  background: #ffffff;
  margin-bottom: 2.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.tp-rubric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
}

.tp-rubric-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
}

.tp-rubric-card.level-excellent {
  border-color: rgba(16, 185, 129, 0.3);
}

.tp-rubric-card.level-excellent::before {
  background: linear-gradient(to bottom, #10b981, #059669);
}

.tp-rubric-card.level-good {
  border-color: rgba(59, 130, 246, 0.3);
}

.tp-rubric-card.level-good::before {
  background: linear-gradient(to bottom, #3b82f6, #2563eb);
}

.tp-rubric-card.level-fair {
  border-color: rgba(245, 158, 11, 0.3);
}

.tp-rubric-card.level-fair::before {
  background: linear-gradient(to bottom, #f59e0b, #d97706);
}

.tp-rubric-card.level-poor {
  border-color: rgba(249, 115, 22, 0.3);
}

.tp-rubric-card.level-poor::before {
  background: linear-gradient(to bottom, #f97316, #ea580c);
}

.tp-rubric-card.level-na {
  border-color: rgba(148, 163, 184, 0.3);
}

.tp-rubric-card.level-na::before {
  background: linear-gradient(to bottom, #94a3b8, #64748b);
}

.tp-rubric-label {
  display: block;
  font-size: 1.25rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
  color: #0f172a;
  letter-spacing: -0.02em;
}

[data-bs-theme="dark"] .tp-checkbox {
  background: #1a1a1a;
  border-color: #2a2a2a;
}

[data-bs-theme="dark"] .tp-checkbox:hover {
  background: #222222;
}

[data-bs-theme="dark"] .tp-checkbox-mark {
  background: #000000;
  border-color: #333333;
}

[data-bs-theme="dark"] .tp-accordion {
  background: #111111;
  border-color: #222222;
}

[data-bs-theme="dark"] .tp-accordion-header {
  background: #1c1c1c;
}

[data-bs-theme="dark"] .tp-competency-item {
  background: #1c1c1c;
  border-color: #2a2a2a;
}

[data-bs-theme="dark"] .tp-rubric-card {
  background: #111111;
  border-color: #222222;
}

[data-bs-theme="dark"] .tp-rubric-label {
  color: #f8fafc;
}

/* Projects Page (Verkefnasmiður) Design System */
.prj-hero {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  border-radius: 32px;
  padding: 4rem;
  color: #ffffff !important;
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: 0 20px 40px rgba(30, 64, 175, 0.2);
}

.prj-hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  filter: blur(40px);
}

.prj-card {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 2.25rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
  height: 100%;
}

.prj-card:hover {
  transform: translateY(-5px);
  border-color: #3b82f6;
  box-shadow: 0 12px 24px rgba(30, 64, 175, 0.1);
}

.prj-feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.prj-step-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.prj-step-item:hover {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 8px 16px rgba(30, 64, 175, 0.05);
}

.prj-step-number {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #3b82f6;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.prj-form-section {
  background: #f8fafc;
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid #e2e8f0;
}

.prj-label {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.75rem;
  display: block;
}

.prj-input {
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.95rem !important;
}

.prj-input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

[data-bs-theme="dark"] .prj-card,
[data-bs-theme="dark"] .prj-form-section,
[data-bs-theme="dark"] .prj-step-item {
  background: #111111;
  border-color: #222222;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .prj-card:hover,
[data-bs-theme="dark"] .prj-step-item:hover {
  border-color: #3b82f6;
  background: #161616;
}

[data-bs-theme="dark"] .prj-label {
  color: #f8fafc;
}

[data-bs-theme="dark"] .prj-input {
  background: #0a0a0a !important;
  border-color: #222222 !important;
  color: #eeeeee !important;
}

.prj-btn {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
  color: #ffffff !important;
  padding: 1rem 2.5rem !important;
  border-radius: 18px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2) !important;
  display: inline-flex;
  align-items: center;
  border: none !important;
}

.prj-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(79, 70, 229, 0.3) !important;
  color: #ffffff !important;
}

.prj-btn-outline {
  background: transparent !important;
  border: 2px solid #e2e8f0 !important;
  color: #64748b !important;
  padding: 1rem 2.5rem !important;
  border-radius: 18px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  display: inline-flex;
  align-items: center;
}

.prj-btn-outline:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
  transform: translateY(-2px);
}

[data-bs-theme="dark"] .prj-btn-outline {
  border-color: #333333 !important;
  color: #94a3b8 !important;
}

[data-bs-theme="dark"] .prj-btn-outline:hover {
  background: #1a1a1a !important;
  color: #f8fafc !important;
}

.prj-btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  padding: 1rem 2.5rem !important;
  border-radius: 18px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2) !important;
  display: inline-flex;
  align-items: center;
  border: none !important;
}

.prj-glass {
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

[data-bs-theme="dark"] .prj-glass {
  background: rgba(17, 17, 17, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.prj-form-card {
  background: #ffffff;
  border-radius: 32px;
  padding: 3.5rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
}

.prj-result-container {
  background: #ffffff;
  border-radius: 32px;
  padding: 3.5rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
  margin-top: 3rem;
}

[data-bs-theme="dark"] .prj-form-card,
[data-bs-theme="dark"] .prj-result-container {
  background: #111111;
  border-color: #222222;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Brain animation for loading */
@keyframes prjBrainProcess {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }

  25% {
    transform: scale(1.15) rotate(5deg);
  }

  50% {
    transform: scale(0.95) rotate(0deg);
  }

  75% {
    transform: scale(1.15) rotate(-5deg);
  }
}

@keyframes prjBrainGlow {

  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(232, 121, 144, 0.4));
  }

  50% {
    filter: drop-shadow(0 0 25px rgba(232, 121, 144, 0.7));
  }
}

.prj-brain-animate {
  color: #e87990 !important;
  animation: prjBrainProcess 2.5s ease-in-out infinite, prjBrainGlow 2.5s ease-in-out infinite;
}

.empty-state:hover .empty-state-icon {
  transform: scale(1.05);
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.empty-state h5 {
  color: #334155;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.empty-state p {
  color: #64748b;
  font-size: 1rem;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

[data-bs-theme="dark"] .empty-state {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(12px);
  border-color: #475569;
}

[data-bs-theme="dark"] .empty-state::before {
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
}

[data-bs-theme="dark"] .empty-state-icon {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  color: #64748b;
}

[data-bs-theme="dark"] .empty-state:hover .empty-state-icon {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

[data-bs-theme="dark"] .empty-state h5 {
  color: #e2e8f0;
}

[data-bs-theme="dark"] .empty-state p {
  color: #94a3b8;
}

/* ============================================
   RESPONSIVE DASHBOARD
   ============================================ */

@media (max-width: 768px) {
  .welcome-section {
    padding: 1.75rem 1.5rem;
    border-radius: 16px;
  }

  .welcome-section h2 {
    font-size: 1.5rem;
  }

  .welcome-section p {
    font-size: 0.9375rem;
  }

  .section-header h4 {
    font-size: 1.25rem;
  }

  .dashboard-card .card-body {
    padding: 1.25rem;
    padding-top: 3rem;
  }

  .empty-state {
    padding: 3rem 1.5rem;
    border-radius: 16px;
  }

  .empty-state-icon {
    width: 64px;
    height: 64px;
    padding: 1rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .row.g-4>[class*="col-"]:has(.dashboard-card) {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .dashboard-card,
  .badge-template,
  .badge-assistant,
  .empty-state-icon {
    transition: none;
  }

  .dashboard-card:hover,
  .dashboard-card:hover .badge-template,
  .dashboard-card:hover .badge-assistant {
    transform: none;
  }
}

/* ============================================
   SLEEK PROFESSIONAL FOOTER - 2025 DESIGN
   ============================================ */

/* Footer Base - Minimal & Deep */
.footer {
  background: #ffffff !important;
  border-top: 1px solid #f1f5f9 !important;
  padding: 4rem 0 3rem !important;
  margin-top: auto;
  position: relative;
  transition: margin-left 0.3s ease;
}

/* Remove the top thick gradient line for a cleaner look */
.footer::before {
  display: none !important;
}

/* Footer Wrapper for Inner Content */
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Footer Paragraphs & Copyright */
.footer p {
  color: #64748b !important;
  font-size: 0.875rem !important;
  line-height: 1.6 !important;
  margin-bottom: 0.75rem !important;
}

/* Section Headings - Clean & Subtle */
.footer .h6,
.footer h6 {
  color: #0f172a !important;
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 1.25rem !important;
  opacity: 0.9;
}

/* Links - Minimal with elegant hover */
.footer a {
  color: #475569 !important;
  text-decoration: none !important;
  font-size: 0.875rem !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-block;
  padding: 2px 0;
}

.footer a:hover {
  color: #2563eb !important;
  transform: translateY(-1px);
}

/* Dark Mode - Perfect Contrast */
[data-bs-theme="dark"] .footer {
  background: #09090b !important;
  border-top-color: #18181b !important;
}

[data-bs-theme="dark"] .footer p {
  color: #a1a1aa !important;
}

[data-bs-theme="dark"] .footer .h6,
[data-bs-theme="dark"] .footer h6 {
  color: #fafafa !important;
}

[data-bs-theme="dark"] .footer a {
  color: #a1a1aa !important;
}

[data-bs-theme="dark"] .footer a:hover {
  color: #60a5fa !important;
}

/* Layout Consistency - Column Spacing */
.footer .row.g-4 {
  --bs-gutter-x: 2.5rem;
}

/* Bottom Bar / Copyright Styling */
.copyright-bar {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}

[data-bs-theme="dark"] .copyright-bar {
  border-top-color: #18181b;
}

/* Responsive Overrides */
@media (max-width: 991px) {
  .footer {
    padding: 3rem 0 2rem !important;
    text-align: left;
    /* Keep it professional, not centered */
  }
}

@media (max-width: 576px) {
  .footer {
    text-align: center;
  }
}


/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .footer a {
    transition: color 0.2s ease;
  }

  .footer a:hover {
    transform: none;
  }

  .footer a::before {
    transition: none;
  }
}

/* ============================================
   SKELETON LOADING STATES - 2025 DESIGN SYSTEM
   ============================================ */

/* Skeleton Base */
.skeleton {
  position: relative;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
  overflow: hidden;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Skeleton Variants */
.skeleton-text {
  height: 1rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

.skeleton-text-sm {
  height: 0.75rem;
  width: 80%;
}

.skeleton-text-lg {
  height: 1.5rem;
  width: 60%;
}

.skeleton-title {
  height: 1.75rem;
  width: 40%;
  margin-bottom: 1rem;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-avatar-sm {
  width: 32px;
  height: 32px;
}

.skeleton-avatar-lg {
  width: 64px;
  height: 64px;
}

.skeleton-card {
  height: 200px;
  border-radius: 16px;
}

.skeleton-button {
  height: 44px;
  width: 120px;
  border-radius: 8px;
}

.skeleton-image {
  height: 150px;
  border-radius: 12px;
}

/* Dark Mode Skeleton */
[data-bs-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
  background-size: 200% 100%;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
    background: #e2e8f0;
  }

  [data-bs-theme="dark"] .skeleton {
    background: #334155;
  }
}

/* ============================================
   GLOBAL UTILITY ENHANCEMENTS
   ============================================ */

/* Smooth hover transitions for all interactive elements */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Icon scaling on hover */
.hover-scale-icon:hover svg,
.hover-scale-icon:hover i {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

/* Gradient text utility */
.text-gradient {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Focus ring utility */
.focus-ring-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Glassmorphism utilities */
.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .glass {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(248, 250, 252, 0.1);
}

/* Smooth fade-in animation */
.animate-fade-in {
  animation: utilityFadeIn 0.5s ease-out forwards;
  opacity: 0;
}

@keyframes utilityFadeIn {
  to {
    opacity: 1;
  }
}

/* Slide-up animation */
.animate-slide-up {
  animation: utilitySlideUp 0.5s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes utilitySlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   MODERN TEMPLATE BOX CARDS - 2025 DESIGN SYSTEM
   ============================================ */

/* Template Box Base */
.template-box {
  display: block;
  position: relative;
  background: #ffffff;
  height: 100%;
  padding: 1.5rem;
  text-decoration: none;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.template-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.template-box:hover {
  transform: translateY(-5px);
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: 0 10px 25px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.template-box:hover::before {
  opacity: 1;
}

/* Dark Mode Template Box */
[data-bs-theme="dark"] .template-box {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .template-box:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.15);
}

/* Template Box Header */
.template-box__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

/* Template Box Icon Label */
.template-box__label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.15);
  transition: all 0.3s ease;
}

.template-box:hover .template-box__label {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgb(0 0 0 / 0.2);
}

/* Template Box Actions */
.template-box__actions {
  position: relative;
  z-index: 2;
}

/* Action Buttons */
.action-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  color: #94a3b8;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  border-color: #cbd5e1;
  color: #64748b;
  background: #f8fafc;
  transform: scale(1.05);
}

.action-btn.pinned {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #fbbf24;
  color: #d97706;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.25);
}

.action-btn.youtube {
  background: #ffffff;
  border: 1px solid #ef4444;
  color: #ef4444;
}

.action-btn.youtube:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Dark Mode Action Buttons */
[data-bs-theme="dark"] .action-btn {
  background: #334155;
  border: 1px solid #475569;
  color: #94a3b8;
}

[data-bs-theme="dark"] .action-btn:hover {
  border-color: #6b7280;
  color: #d1d5db;
  background: #475569;
}

[data-bs-theme="dark"] .action-btn.pinned {
  background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
  border-color: #f59e0b;
  color: #fbbf24;
}

/* Template Box Body */
.template-box__body {
  position: relative;
  z-index: 1;
}

.template-box__body h3 {
  color: #1e293b !important;
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

.template-box:hover .template-box__body h3 {
  color: #0f172a !important;
}

.template-box__body p,
.template-box__body .text-muted,
.template-box__body .small,
a.template-box .template-box__body .text-muted,
a.template-box .text-muted {
  color: #64748b !important;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}

/* Dark Mode Template Box Body */
[data-bs-theme="dark"] .template-box__body h3 {
  color: #f1f5f9;
}

[data-bs-theme="dark"] .template-box:hover .template-box__body h3 {
  color: #818cf8;
}

[data-bs-theme="dark"] .template-box__body p,
[data-bs-theme="dark"] .template-box__body .text-muted {
  color: #94a3b8;
}

/* Premium Badge */
.template-box__premium {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  color: #4f46e5;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgb(79 70 229 / 0.1);
}

[data-bs-theme="dark"] .template-box__premium {
  background: linear-gradient(135deg, #312e81 0%, #3730a3 100%);
  color: #a5b4fc;
}

/* Staggered Animation for Template Grid */
#tab-content>[class*="col-"] {
  animation: templateCardFadeIn 0.5s ease-out forwards;
  opacity: 0;
  transform: translateY(15px);
}

#tab-content>[class*="col-"]:nth-child(1) {
  animation-delay: 0.05s;
}

#tab-content>[class*="col-"]:nth-child(2) {
  animation-delay: 0.1s;
}

#tab-content>[class*="col-"]:nth-child(3) {
  animation-delay: 0.15s;
}

#tab-content>[class*="col-"]:nth-child(4) {
  animation-delay: 0.2s;
}

#tab-content>[class*="col-"]:nth-child(5) {
  animation-delay: 0.25s;
}

#tab-content>[class*="col-"]:nth-child(6) {
  animation-delay: 0.3s;
}

#tab-content>[class*="col-"]:nth-child(7) {
  animation-delay: 0.35s;
}

#tab-content>[class*="col-"]:nth-child(8) {
  animation-delay: 0.4s;
}

@keyframes templateCardFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Template Box */
@media (max-width: 768px) {
  .template-box {
    padding: 1.25rem;
    border-radius: 12px;
  }

  .template-box__label {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .template-box__body h3 {
    font-size: 1rem;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  .template-box,
  .template-box__label,
  .action-btn {
    transition: none;
  }

  .template-box:hover {
    transform: none;
  }

  .template-box:hover .template-box__label {
    transform: none;
  }

  #tab-content>[class*="col-"] {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   MODERN PRICING CARDS - 2025 DESIGN SYSTEM
   ============================================ */

/* Pricing Section */
#pricing {
  position: relative;
}

#pricing .display-6 {
  color: #0f172a;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0f172a 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-bs-theme="dark"] #pricing .display-6 {
  background: linear-gradient(135deg, #f1f5f9 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Pricing Tabs */
#pricing-tab {
  background: #f1f5f9;
  padding: 0.25rem;
  border-radius: 12px;
  display: inline-flex;
  gap: 0.25rem;
}

#pricing-tab .nav-link {
  padding: 0.75rem 1.5rem;
  color: #64748b;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.3s ease;
}

#pricing-tab .nav-link:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.5);
}

#pricing-tab .nav-link.active {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

[data-bs-theme="dark"] #pricing-tab {
  background: #1e293b;
}

[data-bs-theme="dark"] #pricing-tab .nav-link {
  color: #94a3b8;
}

[data-bs-theme="dark"] #pricing-tab .nav-link:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] #pricing-tab .nav-link.active {
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
}

/* Pricing Cards */
#pricing .card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
}

#pricing .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#pricing .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.15);
  border-color: rgba(79, 70, 229, 0.3);
}

#pricing .card:hover::before {
  opacity: 1;
}

/* Highlighted Plan */
#pricing .card.border-warning,
#pricing .card[style*="border-color: #f7d700"] {
  border: 2px solid #fbbf24 !important;
  box-shadow: 0 10px 30px -5px rgba(251, 191, 36, 0.2);
}

#pricing .card.border-warning::before,
#pricing .card[style*="border-color: #f7d700"]::before {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  opacity: 1;
  height: 0;
}

#pricing .card.border-warning:hover,
#pricing .card[style*="border-color: #f7d700"]:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 24px 48px -12px rgba(251, 191, 36, 0.25);
}

/* Popular Badge */
#pricing .position-absolute.w-100 {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem !important;
  border-radius: 0;
}

/* Pricing Amount */
#pricing .h2.fw-bold {
  font-size: 2.5rem;
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-bs-theme="dark"] #pricing .h2.fw-bold {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Dark Mode Pricing Cards */
[data-bs-theme="dark"] #pricing .card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
}

[data-bs-theme="dark"] #pricing .card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.2);
}

/* FAQ Section */
#faq .accordion-item {
  border-bottom: 1px solid #e2e8f0;
}

#faq .accordion-button {
  font-size: 1.0625rem;
  color: #0f172a;
  padding: 1.25rem 0;
}

#faq .accordion-button:not(.collapsed) {
  color: #4f46e5;
}

#faq .accordion-button::after {
  background-size: 1rem;
  transition: transform 0.3s ease;
}

#faq .accordion-body {
  color: #64748b;
  font-size: 1rem;
  line-height: 1.7;
  padding-bottom: 1rem;
}

[data-bs-theme="dark"] #faq .accordion-item {
  border-bottom-color: #334155;
}

[data-bs-theme="dark"] #faq .accordion-button {
  color: #f1f5f9;
}

[data-bs-theme="dark"] #faq .accordion-button:not(.collapsed) {
  color: #818cf8;
}

[data-bs-theme="dark"] #faq .accordion-body {
  color: #94a3b8;
}

/* Responsive Pricing */
@media (max-width: 768px) {
  #pricing .display-6 {
    font-size: 1.75rem;
  }

  #pricing-tab .nav-link {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  #pricing .card {
    border-radius: 16px;
  }

  #pricing .h2.fw-bold {
    font-size: 2rem;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  #pricing .card {
    transition: box-shadow 0.2s ease;
  }

  #pricing .card:hover {
    transform: none;
  }

  #pricing-tab .nav-link {
    transition: color 0.2s ease;
  }
}

/* ============================================
   MODERN CHAT INTERFACE - 2025 DESIGN SYSTEM
   ============================================ */

/* Chat Assistant Selector Cards */
.chat-intro .hover-shadow {
  background: #ffffff;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.chat-intro .hover-shadow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chat-intro .hover-shadow:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 70, 229, 0.3) !important;
  box-shadow: 0 12px 24px -6px rgb(0 0 0 / 0.1) !important;
}

.chat-intro .hover-shadow:hover::before {
  opacity: 1;
}

[data-bs-theme="dark"] .chat-intro .hover-shadow {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155 !important;
}

[data-bs-theme="dark"] .chat-intro .hover-shadow:hover {
  border-color: rgba(99, 102, 241, 0.4) !important;
  box-shadow: 0 12px 24px -6px rgba(99, 102, 241, 0.15) !important;
}

/* Assistant Avatar */
.chat-intro .img-thumbnail {
  border: 2px solid #e2e8f0 !important;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.08);
  transition: all 0.3s ease;
}

.chat-intro .hover-shadow:hover .img-thumbnail {
  border-color: #4f46e5 !important;
  transform: scale(1.05);
}

[data-bs-theme="dark"] .chat-intro .img-thumbnail {
  border-color: #475569 !important;
}

[data-bs-theme="dark"] .chat-intro .hover-shadow:hover .img-thumbnail {
  border-color: #6366f1 !important;
}

/* Chat User Initial */
.chat-user {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Web Search Badge */
.web-search-badge {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
  color: white;
  font-size: 0.625rem;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  animation: none !important;
}

/* Chat Message Area */
.chat-body {
  min-height: 400px;
}

/* User Message */
.user-message {
  margin-bottom: 1.5rem;
}

.user-message .chat-content {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 1rem 1.25rem;
  border-radius: 16px;
  border-top-left-radius: 4px;
}

[data-bs-theme="dark"] .user-message .chat-content {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* AI Response Message */
.response-message {
  margin-bottom: 1.5rem;
}

.response-message .chat-content {
  background: transparent;
  padding: 0.5rem 0;
}

/* ============================================
   SLEEK CHAT INPUT AREA - CLEAN PROFESSIONAL
   ============================================ */

/* Remove ALL backgrounds from chat footer */
.chat-footer {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  border-top: none !important;
  padding: 1rem 0 !important;
  margin: 0 auto;
  max-width: 770px;
}

[data-bs-theme="dark"] .chat-footer {
  background: none !important;
  background-color: transparent !important;
}

/* Sleek Professional Chatbox */
.chat-footer .chatbox,
.chatbox {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 28px !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.25s ease;
  max-width: 100%;
}

.chat-footer .chatbox:focus-within,
.chatbox:focus-within {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1),
    0 2px 12px rgba(99, 102, 241, 0.08) !important;
}

[data-bs-theme="dark"] .chat-footer .chatbox,
[data-bs-theme="dark"] .chatbox {
  background: #1f2937 !important;
  border-color: #374151 !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15) !important;
}

[data-bs-theme="dark"] .chat-footer .chatbox:focus-within,
[data-bs-theme="dark"] .chatbox:focus-within {
  border-color: #818cf8 !important;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15),
    0 2px 12px rgba(129, 140, 248, 0.1) !important;
}

/* Clean Textarea */
.chat-footer textarea,
#prompt-input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  resize: none;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #1f2937;
}

[data-bs-theme="dark"] .chat-footer textarea,
[data-bs-theme="dark"] #prompt-input {
  color: #f3f4f6;
}

.chat-footer textarea::placeholder,
#prompt-input::placeholder {
  color: #9ca3af;
}

[data-bs-theme="dark"] .chat-footer textarea::placeholder,
[data-bs-theme="dark"] #prompt-input::placeholder {
  color: #6b7280;
}

/* Sleek Submit Button */
.chat-footer button[type="submit"],
.btn-submit {
  background: #0f172a !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  margin: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  cursor: pointer;
}

.chat-footer button[type="submit"]:hover:not(:disabled),
.btn-submit:hover:not(:disabled) {
  background: #1e293b !important;
  transform: scale(1.08);
}

.chat-footer button[type="submit"]:disabled,
.btn-submit:disabled {
  background: #d1d5db !important;
  color: #9ca3af !important;
  cursor: not-allowed;
  transform: none;
}

[data-bs-theme="dark"] .chat-footer button[type="submit"],
[data-bs-theme="dark"] .btn-submit {
  background: #f3f4f6 !important;
  color: #0f172a !important;
}

[data-bs-theme="dark"] .chat-footer button[type="submit"]:hover:not(:disabled),
[data-bs-theme="dark"] .btn-submit:hover:not(:disabled) {
  background: #ffffff !important;
}

[data-bs-theme="dark"] .chat-footer button[type="submit"]:disabled,
[data-bs-theme="dark"] .btn-submit:disabled {
  background: #374151 !important;
  color: #6b7280 !important;
}

/* Upload Button */
.chat-footer #uploadButton {
  color: #6b7280;
  transition: color 0.2s ease;
}

.chat-footer #uploadButton:hover {
  color: #374151;
}

[data-bs-theme="dark"] .chat-footer #uploadButton {
  color: #9ca3af;
}

[data-bs-theme="dark"] .chat-footer #uploadButton:hover {
  color: #e5e7eb;
}

/* ============================================
   PROFESSIONAL CHAT SIDEBAR - CHATGPT STYLE
   ============================================ */

/* Main Sidebar Container */
.chat-sidebar {
  background: #f7f7f8 !important;
  border-left: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Sidebar Inner Padding */
.chat-sidebar .mx-3,
.chat-sidebar .mx-xxl-0 {
  padding: 0.75rem 0.5rem;
}

/* New Chat Button - Professional */
.chat-sidebar .btn-light,
.chat-sidebar .row .btn {
  background: transparent !important;
  border: 1px dashed #d1d5db !important;
  border-radius: 10px !important;
  color: #374151 !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  padding: 0.625rem 1rem !important;
  transition: all 0.2s ease;
}

.chat-sidebar .btn-light:hover,
.chat-sidebar .row .btn:hover {
  background: #ececec !important;
  border-style: solid !important;
  border-color: #c4c4c4 !important;
}

/* Chat History Container */
.chat-history {
  padding: 0 0.5rem;
}

/* Section Title */
.chat-history .fw-semibold,
.chat-sidebar .fw-semibold.text-muted {
  color: #6b7280 !important;
  font-weight: 500 !important;
  font-size: 0.6875rem !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 0.75rem 0.5rem;
  margin: 0 !important;
}

/* Chat History Items */
.chat-history .nav-link,
.chat-history-body .nav-link {
  color: #1f2937 !important;
  background: transparent !important;
  padding: 0.5rem 0.75rem !important;
  border-radius: 8px !important;
  margin-bottom: 2px !important;
  transition: background 0.15s ease;
  font-size: 0.8125rem !important;
  font-weight: 400 !important;
  border: none !important;
}

.chat-history .nav-link:hover,
.chat-history-body .nav-link:hover {
  background: #ececec !important;
  color: #111827 !important;
}

.chat-history .nav-link.active,
.chat-history-body .nav-link.active {
  background: #e5e5e5 !important;
  color: #111827 !important;
  font-weight: 500 !important;
}

/* Icon in chat items */
.chat-history .nav-link svg,
.chat-history-body .nav-link svg {
  opacity: 0.6;
  flex-shrink: 0;
}

/* Dark Mode */
[data-bs-theme="dark"] .chat-sidebar {
  background: #171717 !important;
}

[data-bs-theme="dark"] .chat-sidebar .btn-light,
[data-bs-theme="dark"] .chat-sidebar .row .btn {
  background: transparent !important;
  border: 1px dashed #404040 !important;
  color: #d4d4d4 !important;
}

[data-bs-theme="dark"] .chat-sidebar .btn-light:hover,
[data-bs-theme="dark"] .chat-sidebar .row .btn:hover {
  background: #262626 !important;
  border-style: solid !important;
  border-color: #525252 !important;
}

[data-bs-theme="dark"] .chat-history .fw-semibold,
[data-bs-theme="dark"] .chat-sidebar .fw-semibold.text-muted {
  color: #737373 !important;
}

[data-bs-theme="dark"] .chat-history .nav-link,
[data-bs-theme="dark"] .chat-history-body .nav-link {
  color: #d4d4d4 !important;
}

[data-bs-theme="dark"] .chat-history .nav-link:hover,
[data-bs-theme="dark"] .chat-history-body .nav-link:hover {
  background: #262626 !important;
  color: #fafafa !important;
}

[data-bs-theme="dark"] .chat-history .nav-link.active,
[data-bs-theme="dark"] .chat-history-body .nav-link.active {
  background: #303030 !important;
  color: #fafafa !important;
}

/* Pin Chat Star */
.pin-chat {
  opacity: 0.6;
  transition: all 0.3s ease;
}

.pin-chat:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* Cursor Pointer */
.cursor-pointer {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cursor-pointer:hover {
  transform: scale(1.1);
}

/* AI Thinking Indicator Enhancement */
.result-thinking {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #4f46e5;
  font-weight: 500;
}

.result-thinking .dot {
  width: 6px;
  height: 6px;
  background: #4f46e5;
  border-radius: 50%;
  animation: thinkingPulse 1.4s ease-in-out infinite;
}

.result-thinking .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.result-thinking .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes thinkingPulse {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

[data-bs-theme="dark"] .result-thinking {
  color: #818cf8;
}

[data-bs-theme="dark"] .result-thinking .dot {
  background: #818cf8;
}

/* Responsive Chat */
@media (max-width: 768px) {
  .chat-intro .hover-shadow {
    border-radius: 12px !important;
  }

  .chatbox {
    border-radius: 12px;
  }

  .user-message .chat-content,
  .response-message .chat-content {
    border-radius: 12px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  .chat-intro .hover-shadow,
  .chat-intro .img-thumbnail,
  .pin-chat,
  .cursor-pointer,
  .btn-submit,
  .chatbox {
    transition: none;
  }

  .chat-intro .hover-shadow:hover,
  .chat-intro .hover-shadow:hover .img-thumbnail,
  .btn-submit:hover:not(:disabled),
  .cursor-pointer:hover {
    transform: none;
  }

  .result-thinking .dot {
    animation: none;
    opacity: 1;
  }
}

/* ============================================
   CHAT PAGE CLEAN POLISH
   ============================================ */

/* New Chat Button - Clean */
.chat-sidebar .btn-light {
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  font-weight: 500 !important;
  border-radius: 8px !important;
  transition: all 0.15s ease;
  color: #374151 !important;
}

.chat-sidebar .btn-light:hover {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
}

[data-bs-theme="dark"] .chat-sidebar .btn-light {
  background: #1f2937 !important;
  border: 1px solid #374151 !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .chat-sidebar .btn-light:hover {
  background: #374151 !important;
  border-color: #4b5563 !important;
}

/* Chat Area - Full Transparent */
.chat-area {
  background: transparent !important;
}

/* Chat Intro - Clean Typography */
.chat-intro h3,
.chat-intro h4 {
  color: #111827;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
}

[data-bs-theme="dark"] .chat-intro h3,
[data-bs-theme="dark"] .chat-intro h4 {
  color: #f9fafb;
}

/* Collapse Button - Minimal */
.collapse-chat-sidebar {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-right: none !important;
  border-radius: 8px 0 0 8px !important;
  box-shadow: none !important;
}

[data-bs-theme="dark"] .collapse-chat-sidebar {
  background: #1f2937 !important;
  border-color: #374151 !important;
}

/* ============================================
   SIDEBAR CONSOLIDATION (from Sidebar.php)
   ============================================ */

/* Modern 2025 Sidebar Styles with Perfect Dark Mode */
:root {
  --sidebar-width-desktop: 280px;
  --sidebar-width-mobile: 320px;
  --primary-blue: #4C8FF5;
  --primary-blue-dark: #3b82f6;

  /* Light Mode Colors */
  --sidebar-bg: #ffffff;
  --nav-item-hover: #f8fafc;
  --nav-item-active: #eff6ff;
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  /* Modern 2025 Dark Mode Colors - High Contrast & Perfect Visibility */
  --sidebar-bg-dark: #0a0e27;
  --nav-item-hover-dark: #1a1f3a;
  --nav-item-active-dark: #1e2749;
  --text-primary-dark: #f8fafc;
  --text-muted-dark: #cbd5e1;
  --border-color-dark: #2d3748;
  --shadow-dark: 0 10px 15px -3px rgba(0, 0, 0, 0.6);

  /* Enhanced Dark Mode Accent Colors */
  --dark-card-bg: #0f1629;
  --dark-card-border: #334155;
  --dark-hover-glow: rgba(59, 130, 246, 0.1);
  --dark-active-glow: rgba(59, 130, 246, 0.15);
}

/* Sidebar Wrapper */
.modern-sidebar-wrapper {
  position: relative;
  z-index: 1000;
}

/* Base Sidebar Styles */
.modern-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  overflow: hidden;
}

[data-bs-theme=dark] .modern-sidebar {
  background: rgba(15, 23, 42, 0.8);
  border-right: 1px solid rgba(248, 250, 252, 0.1);
  box-shadow: var(--shadow-dark);
  backdrop-filter: blur(15px);
}

/* Desktop Sidebar */
.desktop-sidebar {
  width: var(--sidebar-width-desktop);
  display: block;
  top: 80px;
  /* Account for header height */
  height: calc(100vh - 80px);
}

@media (max-width: 991.98px) {
  .desktop-sidebar {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
  }
}

/* Mobile Sidebar */
.mobile-sidebar {
  width: var(--sidebar-width-mobile);
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  display: none;
  top: 0;
  /* Mobile sidebar goes full height */
  height: 100vh;
}

@media (max-width: 991.98px) {
  .mobile-sidebar {
    display: block;
  }

  .mobile-sidebar.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
  }
}

/* Mobile Overlay */
.mobile-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.mobile-sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Sidebar Header */
.mobile-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--primary-blue), #60a5fa);
}

[data-bs-theme=dark] .mobile-sidebar-header {
  border-bottom: 1px solid var(--border-color-dark);
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sidebar-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

/* Sidebar Content */
.sidebar-content {
  height: 100%;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-content {
  padding-top: 1.5rem;
}

/* Progress/Credits Section */
.credits-section {
  background: linear-gradient(135deg, var(--nav-item-active), #dbeafe);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-bs-theme=dark] .credits-section {
  background: linear-gradient(135deg, var(--dark-card-bg), #1e3a8a);
  border: 1px solid var(--dark-card-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 6px;
  transition: width 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(76, 143, 245, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(76, 143, 245, 0.4);
}

/* Navigation Menu */
.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  margin-bottom: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.2s ease;
  font-weight: 500;
  position: relative;
  border: 1px solid transparent;
}

[data-bs-theme=dark] .nav-link {
  color: var(--text-primary-dark);
  border: 1px solid transparent;
}

.nav-link:hover {
  background: var(--nav-item-hover);
  color: var(--primary-blue);
  border-color: var(--border-color);
  transform: translateX(4px);
}

[data-bs-theme=dark] .nav-link:hover {
  background: var(--nav-item-hover-dark);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 2px 10px var(--dark-hover-glow);
  backdrop-filter: blur(5px);
}

.nav-link.active,
.nav-link.actived {
  background: linear-gradient(135deg, rgba(76, 143, 245, 0.1), rgba(219, 234, 254, 0.4)) !important;
  color: var(--primary-blue-dark) !important;
  border-color: rgba(76, 143, 245, 0.2) !important;
  box-shadow: 0 4px 12px rgba(76, 143, 245, 0.1);
  backdrop-filter: blur(8px);
}

.sidebar-menu .nav-link.active::before,
.sidebar-menu .nav-link.actived::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 20%;
  height: 60%;
  width: 4px;
  background: var(--primary-blue);
  border-radius: 0 4px 4px 0;
  box-shadow: 2px 0 10px rgba(76, 143, 245, 0.5);
}

[data-bs-theme=dark] .nav-link.active,
[data-bs-theme=dark] .nav-link.actived {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(30, 58, 138, 0.3)) !important;
  color: #bfdbfe !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

[data-bs-theme=dark] .sidebar-menu .nav-link.active::before,
[data-bs-theme=dark] .sidebar-menu .nav-link.actived::before {
  background: #60a5fa;
  box-shadow: 2px 0 15px rgba(96, 165, 250, 0.6);
}


.nav-link svg {
  width: 20px;
  height: 20px;
  margin-right: 0.75rem;
  transition: transform 0.2s ease;
}

.nav-link:hover svg {
  transform: scale(1.1);
}

.nav-link span {
  font-size: 0.95rem;
}

/* Clean Section Headers - Compact Spacing */
.divider {
  padding: 0.75rem 0 0.5rem;
  margin: 0.75rem 0 0.5rem;
  position: relative;
}

.divider span {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.4rem 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
  border-radius: 0;
  display: block;
  width: 100%;
  position: relative;
  border: 1px solid rgba(226, 232, 240, 0.8);
  text-align: center;
  transition: all 0.3s ease;
}

[data-bs-theme=dark] .divider span {
  color: var(--text-muted-dark);
  font-weight: 600;
  background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
  border: 1px solid rgba(71, 85, 105, 0.6);
}

/* Clean hover effect */
.divider:hover span {
  border-color: rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 50%, #e2e8f0 100%);
  transition: all 0.3s ease;
}

[data-bs-theme=dark] .divider:hover span {
  border-color: rgba(96, 165, 250, 0.4);
  background: linear-gradient(135deg, #334155 0%, #475569 50%, #64748b 100%);
}

/* Footer Button */
.sidebar-footer {
  padding: 1rem;
  margin-top: auto;
}

.feedback-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.feedback-btn:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

/* Layout Adjustments */
@media (min-width: 992px) {

  .main,
  .footer {
    margin-left: var(--sidebar-width-desktop);
    transition: margin-left 0.3s ease;
  }
}

@media (max-width: 991.98px) {

  .main,
  .footer {
    margin-left: 0;
  }
}



/* Scrollbar Styling */
.sidebar-content::-webkit-scrollbar {
  width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

[data-bs-theme=dark] .sidebar-content::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #475569, #64748b);
  border-radius: 6px;
}

[data-bs-theme=dark] .sidebar-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #64748b, #475569);
}

/* Animation Classes */
.sidebar-slide-in {
  animation: slideIn 0.3s ease;
}

.sidebar-slide-out {
  animation: slideOut 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
  .modern-sidebar {
    -webkit-overflow-scrolling: touch;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  .mobile-sidebar.active {
    -webkit-transform: translateX(0) translateZ(0);
    transform: translateX(0) translateZ(0);
  }

  .nav-link {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
}

/* Header fixes for mobile sidebar */
@media (max-width: 991.98px) {
  .fixed-top {
    z-index: 999;
  }
}

/* TP Utility Classes */
.extra-small {
  font-size: 0.75rem !important;
}

.italic {
  font-style: italic;
}

/* Footer stick to bottom on short pages */
footer {
  margin-top: auto;
}

/* Mobile Footer Improvements */
@media (max-width: 768px) {
  footer.footer {
    padding: 1.5rem 1rem !important;
    text-align: center;
  }

  footer .row {
    text-align: center;
  }

  footer .col-6 {
    width: 50%;
    margin-bottom: 1.5rem;
  }

  footer .col-12 {
    margin-bottom: 1rem;
  }

  footer .h6 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem !important;
  }

  footer p {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }

  footer ul li {
    margin-bottom: 0.5rem !important;
  }

  footer ul li a {
    font-size: 0.85rem;
  }

  footer .icon {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 576px) {
  footer.footer {
    padding: 1.25rem 0.75rem !important;
  }

  footer .col-6 {
    width: 100%;
    text-align: left;
    padding-left: 1rem;
  }

  footer .h6 {
    font-size: 0.85rem;
  }

  footer p,
  footer ul li a {
    font-size: 0.8rem;
  }
}

/* ==== Main Content Area - Reduce Empty Space ==== */
/* Desktop: reduce inner offset for wider content */
@media (min-width: 992px) {

  .main .row.justify-content-lg-start .col-md-10.offset-lg-1,
  .main .row.justify-content-lg-start .col-lg-10.offset-lg-1,
  .main .row.justify-content-lg-start .col-xl-9.offset-lg-1 {
    margin-left: 0 !important;
    max-width: 100%;
    flex: 0 0 100%;
  }

  .main {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Tablet: fuller width content */
@media (max-width: 991.98px) {
  .main {
    margin-left: 0 !important;
    padding: 1rem 0.75rem !important;
  }

  .main .row .col-md-10,
  .main .row .col-lg-10,
  .main .row .col-xl-9 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .main .offset-lg-1 {
    margin-left: 0 !important;
  }
}

/* Mobile: minimal padding for max content */
@media (max-width: 576px) {
  .main {
    padding: 0.75rem 0.5rem !important;
  }
}

/* ==== Projects Page Mobile Improvements ==== */
@media (max-width: 768px) {
  .prj-hero {
    padding: 2rem 1.5rem !important;
    border-radius: 20px !important;
    margin-bottom: 2rem !important;
  }

  .prj-hero h1,
  .prj-hero .display-4 {
    font-size: 1.75rem !important;
  }

  .prj-hero .h4 {
    font-size: 1rem !important;
  }

  .prj-hero .lead {
    font-size: 0.9rem !important;
  }

  .prj-card {
    padding: 1.5rem !important;
    border-radius: 16px !important;
    margin-bottom: 1rem !important;
  }

  .prj-feature-icon {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
  }

  .prj-form-card {
    padding: 1.5rem !important;
    border-radius: 16px !important;
  }

  .prj-form-section {
    padding: 1rem !important;
  }

  .prj-btn {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9rem !important;
  }

  .prj-step-item {
    padding: 1rem !important;
    gap: 1rem !important;
  }

  .prj-step-number {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.9rem !important;
  }
}

@media (max-width: 576px) {
  .prj-hero {
    padding: 1.5rem 1rem !important;
    border-radius: 16px !important;
  }

  .prj-hero h1,
  .prj-hero .display-4 {
    font-size: 1.5rem !important;
  }

  .prj-card {
    padding: 1.25rem !important;
  }

  .prj-form-card {
    padding: 1rem !important;
  }
}

/* ============================================
   TEMPLATES PAGE - SLEEK DESIGN ENHANCEMENTS
   ============================================ */

/* Templates Page Search Bar */
#search-template {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e2e8f0;
  border-radius: 16px !important;
  padding-left: 3.5rem !important;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

#search-template:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 4px 12px rgba(99, 102, 241, 0.1);
  background: #ffffff;
}

#search-template::placeholder {
  color: #94a3b8;
}

[data-bs-theme="dark"] #search-template {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-color: #334155;
  color: #f1f5f9;
}

[data-bs-theme="dark"] #search-template:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.15), 0 4px 12px rgba(129, 140, 248, 0.1);
}

[data-bs-theme="dark"] #search-template::placeholder {
  color: #64748b;
}

/* Templates Page Category Tabs */
#template-group {
  background: #f8fafc;
  border-radius: 16px;
  padding: 0.5rem;
  margin-bottom: 1.5rem;
}

#template-group button.nav-link {
  background: transparent;
  border: none;
  border-radius: 12px;
  padding: 0.625rem 1.25rem !important;
  font-weight: 600;
  color: #64748b;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

#template-group button.nav-link:hover {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
}

#template-group button.nav-link.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

[data-bs-theme="dark"] #template-group {
  background: #1e293b;
}

[data-bs-theme="dark"] #template-group button.nav-link {
  color: #94a3b8;
}

[data-bs-theme="dark"] #template-group button.nav-link:hover {
  background: rgba(129, 140, 248, 0.1);
  color: #a5b4fc;
}

[data-bs-theme="dark"] #template-group button.nav-link.active {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
  color: #ffffff !important;
}

/* Enhanced Template Box hover glow */
.template-box:hover {
  box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.15),
    0 10px 20px -5px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .template-box:hover {
  box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.25),
    0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

/* Template Form Card Enhancements (when viewing single template) */
.post-form .card {
  border: none;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

[data-bs-theme="dark"] .post-form .card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Template Result Cards */
#results .card,
#response .card,
#history-tab-pane .card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

#results .card:hover,
#response .card:hover,
#history-tab-pane .card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] #results .card,
[data-bs-theme="dark"] #response .card,
[data-bs-theme="dark"] #history-tab-pane .card {
  background: #1e293b;
  border: 1px solid #334155;
}

/* Templates Mobile Improvements */
@media (max-width: 768px) {
  #search-template {
    padding: 0.875rem 1rem 0.875rem 3rem !important;
  }

  #template-group {
    padding: 0.25rem;
    border-radius: 12px;
  }

  #template-group button.nav-link {
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem;
  }

  .template-box {
    padding: 1.25rem !important;
  }

  .template-box__label {
    width: 40px !important;
    height: 40px !important;
  }

  .template-box__body h3 {
    font-size: 1rem !important;
  }

  .template-box__body .text-muted {
    font-size: 0.8rem !important;
  }
}

@media (max-width: 576px) {
  .template-box {
    padding: 1rem !important;
  }

  .template-box__header {
    margin-bottom: 1rem;
  }

  .template-box__label {
    width: 36px !important;
    height: 36px !important;
  }
}

/* ============================================
   FIX HORIZONTAL SCROLL ISSUE
   ============================================ */
html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}

main {
  overflow-x: hidden;
}

.main {
  overflow-x: hidden;
  max-width: 100%;
}

.container-fluid {
  overflow-x: hidden;
  max-width: 100%;
}

/* Fix Bootstrap row negative margins causing overflow */
.row {
  margin-left: 0;
  margin-right: 0;
}

.row>* {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

/* Bottom spacing for content before footer */
.main {
  padding-bottom: 3rem !important;
}

#tab-content {
  padding-bottom: 2rem;
}

/* Ensure all content respects container */
* {
  box-sizing: border-box;
}

img,
video,
iframe {
  max-width: 100%;
}

/* ============================================
   CHAT PAGE - SLEEK MODERN DESIGN
   ============================================ */

/* Chat Area Container */
.chat-area {
  background: transparent !important;
}

@media (min-width: 992px) {
  .chat-area {
    /* width: 770px; */
    /* height: calc(100vh - 110px); */
  }
}

[data-bs-theme="dark"] .chat-area {
  background: transparent !important;
}

/* Chat Body Scrollable Area */
.chat-body {
  padding: 1.5rem;
}

/* Chat Intro Section */
.chat-intro {
  padding: 3rem 2rem;
}

.chat-intro h3,
.chat-intro h4 {
  color: #1e293b;
  font-weight: 700;
}

[data-bs-theme="dark"] .chat-intro h3,
[data-bs-theme="dark"] .chat-intro h4 {
  color: #f1f5f9;
}

/* User Message - Right aligned with avatar */
.user-message {
  margin-bottom: 2rem;
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.user-message .flex-shrink-0 {
  margin-right: 0 !important;
  margin-left: 1rem;
}

.user-message .chat-user {
  width: 32px !important;
  height: 32px !important;
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .user-message .chat-user {
  border-color: #374151;
}

.user-message .chat-content {
  background: #f3f4f6;
  color: #1e293b;
  padding: 1rem 1.25rem;
  border-radius: 20px 20px 4px 20px;
  max-width: 70%;
  margin-left: auto;
  box-shadow: none;
  border: none;
}

[data-bs-theme="dark"] .user-message .chat-content {
  background: #374151;
  color: #f1f5f9;
}

.user-message .chat-content h6 {
  display: none;
}

.user-message .chat-content .ai-content,
.user-message .chat-content .markdown {
  color: #1e293b;
  line-height: 1.7;
  font-size: 1rem;
}

[data-bs-theme="dark"] .user-message .chat-content .ai-content,
[data-bs-theme="dark"] .user-message .chat-content .markdown {
  color: #f1f5f9;
}

.user-message .chat-action {
  display: none;
}

/* AI Response - Left aligned with original avatar */
.response-message {
  margin-bottom: 2rem;
  justify-content: flex-start;
  align-items: flex-start;
}

.response-message .flex-shrink-0 {
  margin-right: 1rem !important;
}

.response-message .chat-user {
  width: 32px !important;
  height: 32px !important;
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .response-message .chat-user {
  border-color: #374151;
}

.response-message .chat-content {
  background: transparent !important;
  border: none !important;
  color: #1e293b;
  padding: 0;
  max-width: 85%;
  box-shadow: none !important;
  border-radius: 0;
}

[data-bs-theme="dark"] .response-message .chat-content {
  color: #f1f5f9;
}

.response-message .chat-content h6 {
  display: none;
}

.response-message .chat-content .ai-content,
.response-message .chat-content .markdown {
  color: #1e293b;
  line-height: 1.8;
  font-size: 1rem;
}

[data-bs-theme="dark"] .response-message .chat-content .ai-content,
[data-bs-theme="dark"] .response-message .chat-content .markdown {
  color: #e2e8f0;
}

.response-message .chat-action {
  margin-top: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.response-message:hover .chat-action {
  opacity: 1;
}

/* Chat User Avatar */
.chat-user {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Chat Input Box - Gemini Style Design */
.chat-footer {
  background: transparent;
  padding: 1rem 0 1.5rem;
}

.chatbox {
  background: #ffffff;
  border: 1px solid #dfe1e5;
  border-radius: 28px;
  padding: 8px 12px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Chat Input Row - Flex Container */
.chat-input-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px;
  width: 100%;
}

.chatbox:hover {
  border-color: #c4c7cc;
}

.chatbox:focus-within {
  border-color: #bdc1c6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .chatbox {
  background: #303134;
  border-color: #5f6368;
}

[data-bs-theme="dark"] .chatbox:hover {
  border-color: #80868b;
}

[data-bs-theme="dark"] .chatbox:focus-within {
  border-color: #8ab4f8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Input Group - Flex alignment */
.chatbox .d-flex.align-items-end,
.chatbox .input-group {
  display: flex !important;
  align-items: center !important;
  gap: 4px;
}

/* Textarea */
#prompt-input {
  border: none !important;
  background: transparent !important;
  resize: none;
  box-shadow: none !important;
  padding: 10px 12px !important;
  font-size: 1rem;
  max-height: 200px;
  min-height: 44px;
  height: 44px;
  line-height: 1.5;
  color: #202124;
  flex: 1;
  margin: 0 !important;
}

[data-bs-theme="dark"] #prompt-input {
  color: #e8eaed;
}

#prompt-input::placeholder {
  color: #9aa0a6;
}

#prompt-input:focus {
  outline: none !important;
}

/* Common button styles for chat input */
.chat-input-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-shrink: 0;
  background: transparent;
  color: #5f6368;
  transition: all 0.15s ease;
}

.chat-input-btn svg {
  width: 20px;
  height: 20px;
}

.chat-input-btn:hover:not(:disabled) {
  background: #f1f3f4;
  color: #202124;
}

/* Upload/Attachment Button (+) */
#uploadButton {
  color: #5f6368;
}

#uploadButton:hover {
  background: #f1f3f4;
  color: #202124;
}

/* Microphone Button (disabled) */
.mic-btn {
  color: #bdc1c6;
  cursor: not-allowed;
}

.mic-btn:disabled {
  opacity: 0.6;
}

/* Submit Button */
.btn-submit {
  background: #1a73e8 !important;
  color: #ffffff !important;
}

.btn-submit:hover:not(:disabled) {
  background: #1557b0 !important;
}

.btn-submit:disabled {
  background: #e8eaed !important;
  color: #9aa0a6 !important;
  cursor: not-allowed;
}

/* Dark Mode Styles */
[data-bs-theme="dark"] .chat-input-btn {
  color: #9aa0a6;
}

[data-bs-theme="dark"] .chat-input-btn:hover:not(:disabled) {
  background: #3c4043;
  color: #e8eaed;
}

[data-bs-theme="dark"] .mic-btn {
  color: #5f6368;
}

[data-bs-theme="dark"] .btn-submit {
  background: #8ab4f8 !important;
  color: #202124 !important;
}

[data-bs-theme="dark"] .btn-submit:hover {
  background: #aecbfa !important;
}

/* Submit Button - Clean circular design */
.btn-submit {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: #1a73e8;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  border: none;
  margin-bottom: 2px;
}

.btn-submit:hover:not(:disabled) {
  background: #1557b0;
}

.btn-submit:disabled {
  background: #f1f3f4;
  color: #9aa0a6;
}

[data-bs-theme="dark"] .btn-submit {
  background: #8ab4f8;
  color: #202124;
}

[data-bs-theme="dark"] .btn-submit:hover:not(:disabled) {
  background: #aecbfa;
}

[data-bs-theme="dark"] .btn-submit:disabled {
  background: #3c4043;
  color: #5f6368;
}

/* Upload/Attachment Button */
#uploadButton {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  color: #5f6368;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease;
  margin-bottom: 2px;
  padding: 0 !important;
}

#uploadButton svg {
  margin: 0 auto;
}

#uploadButton:hover {
  background: #f1f3f4;
  color: #202124;
}

[data-bs-theme="dark"] #uploadButton {
  color: #9aa0a6;
}

[data-bs-theme="dark"] #uploadButton:hover {
  background: #3c4043;
  color: #e8eaed;
}

/* Assistant Selection Cards */
.chat-intro a.hover-shadow {
  background: #ffffff;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.chat-intro a.hover-shadow:hover {
  border-color: #6366f1 !important;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12) !important;
  transform: translateY(-2px);
}

[data-bs-theme="dark"] .chat-intro a.hover-shadow {
  background: #1e293b;
  border-color: #334155 !important;
}

[data-bs-theme="dark"] .chat-intro a.hover-shadow:hover {
  border-color: #818cf8 !important;
  box-shadow: 0 8px 24px rgba(129, 140, 248, 0.15) !important;
}

/* Chat History Sidebar - Sleek Minimal Design */
.chat-sidebar {
  background: #fafafa;
  border-left: 1px solid #f0f0f0;
  width: 280px !important;
  max-width: 280px !important;
}

[data-bs-theme="dark"] .chat-sidebar {
  background: #111827;
  border-color: #1f2937;
}

/* Reduce sidebar visual weight */
.chat-sidebar .offcanvas-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}

[data-bs-theme="dark"] .chat-sidebar .offcanvas-header {
  border-color: #1f2937;
}

.chat-history .nav-link {
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 2px;
  color: #6b7280;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.chat-history .nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #374151;
}

.chat-history .nav-link.active {
  background: rgba(66, 133, 244, 0.08);
  color: #1a73e8;
  font-weight: 500;
}

[data-bs-theme="dark"] .chat-history .nav-link {
  color: #9ca3af;
}

[data-bs-theme="dark"] .chat-history .nav-link:hover {
  background: #1e293b;
}

[data-bs-theme="dark"] .chat-history .nav-link.active {
  background: rgba(129, 140, 248, 0.1);
  color: #818cf8;
}

/* Chat Actions */
.chat-action button {
  opacity: 0.6;
  transition: all 0.2s ease;
}

.chat-action button:hover {
  opacity: 1;
  color: #4f46e5;
}

/* Chat Footer */
.chat-footer {
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 1.5rem;
}

[data-bs-theme="dark"] .chat-footer {
  background: rgba(15, 23, 42, 0.95);
}

/* Collapse Chat Sidebar Button */
.collapse-chat-sidebar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.collapse-chat-sidebar:hover {
  background: #e2e8f0;
  color: #4f46e5;
}

[data-bs-theme="dark"] .collapse-chat-sidebar {
  background: #1e293b;
  color: #94a3b8;
}

[data-bs-theme="dark"] .collapse-chat-sidebar:hover {
  background: #334155;
  color: #818cf8;
}

/* Chat Mobile Improvements */
@media (max-width: 768px) {
  .chat-area {
    border-radius: 0;
  }

  .chat-body {
    padding: 1rem;
  }

  .chatbox {
    border-radius: 20px;
    padding: 0.375rem;
  }

  .user-message .chat-content,
  .response-message .chat-content {
    max-width: 95%;
    padding: 0.875rem 1rem;
    border-radius: 16px;
  }

  .chat-intro {
    padding: 2rem 1rem;
  }

  .chat-intro a.hover-shadow {
    padding: 1rem !important;
    flex-direction: column !important;
  }

  .chat-intro a.hover-shadow>div:first-child {
    width: 100% !important;
    margin-bottom: 0.75rem;
    margin-right: 0 !important;
  }
}

/* ============================================
   CHAT PAGE - ADDITIONAL POLISH
   ============================================ */

/* Hide the collapse button on desktop - sidebar should always show */
@media (min-width: 992px) {
  .collapse-chat-sidebar {
    display: none !important;
  }
}

/* Better Collapse Button Styling */
.collapse-chat-sidebar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 100;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.collapse-chat-sidebar:hover {
  background: #f8fafc;
  border-color: #6366f1;
  color: #6366f1;
  transform: translateX(-2px);
}

[data-bs-theme="dark"] .collapse-chat-sidebar {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

[data-bs-theme="dark"] .collapse-chat-sidebar:hover {
  border-color: #818cf8;
  color: #818cf8;
}

/* Chat Conversation Enhancements */
#chat-message {
  padding: 1rem 0;
}

/* Better User Avatar */
.user-message .chat-user,
.response-message .chat-user {
  width: 38px;
  height: 38px;
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .user-message .chat-user,
[data-bs-theme="dark"] .response-message .chat-user {
  border-color: #334155;
}

/* Better response message styling */
.response-message .chat-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

[data-bs-theme="dark"] .response-message .chat-content {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* Assistant Name Styling */
.response-message h6,
.user-message h6 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

/* Chat Intro Header */
.chat-intro h3 {
  font-size: 1.75rem;
  background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

[data-bs-theme="dark"] .chat-intro h3 {
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.chat-intro p {
  color: #64748b;
  font-size: 1rem;
}

/* Assistant Selection Cards Enhancement */
.chat-intro a.hover-shadow .img-thumbnail {
  border: none !important;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
}

[data-bs-theme="dark"] .chat-intro a.hover-shadow .img-thumbnail {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
}

.chat-intro a.hover-shadow .fw-bold {
  color: #1e293b !important;
  font-size: 1rem;
}

[data-bs-theme="dark"] .chat-intro a.hover-shadow .fw-bold {
  color: #f1f5f9 !important;
}

.chat-intro a.hover-shadow .text-muted {
  color: #64748b !important;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Pin/Star Button Enhancement */
.pin-chat {
  cursor: pointer;
  transition: all 0.2s ease;
}

.pin-chat:hover {
  transform: scale(1.15);
}

/* Chat History Sidebar Header */
.chat-history .fw-semibold {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
}

/* New Chat Button */
.chat-sidebar .btn-light {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.875rem;
  transition: all 0.25s ease;
}

.chat-sidebar .btn-light:hover {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border-color: #6366f1;
}

[data-bs-theme="dark"] .chat-sidebar .btn-light {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  border-color: #475569;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .chat-sidebar .btn-light:hover {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-color: #6366f1;
}

/* Improve Chat Input Placeholder */
#prompt-input::placeholder {
  color: #94a3b8;
  font-style: italic;
}

[data-bs-theme="dark"] #prompt-input::placeholder {
  color: #64748b;
}

/* Smooth scroll for chat body */
.chat-body .simplebar-content-wrapper {
  scroll-behavior: smooth;
}

/* Web Search Badge */
.web-search-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   CHAT AREA OVERRIDES - END OF FILE (Highest Priority)
   ============================================ */
.chat-area,
[data-bs-theme="dark"] .chat-area,
.chat-area.bg-body-tertiary {
  background: transparent !important;
  background-color: transparent !important;
}

@media (min-width: 992px) {
  .chat-area {
    /* width: 770px; */
    /* height: calc(100vh - 110px); */
  }
}

/* ============================================
   SIDEBAR SCROLLBAR - Show on Hover Only
   ============================================ */
/* Hide scrollbar by default */
.sidebar,
.chat-sidebar,
.offcanvas-body {
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
}

.sidebar::-webkit-scrollbar,
.chat-sidebar::-webkit-scrollbar,
.offcanvas-body::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

/* Show scrollbar on hover */
.sidebar:hover,
.chat-sidebar:hover,
.offcanvas-body:hover {
  scrollbar-width: thin;
  /* Firefox */
}

.sidebar:hover::-webkit-scrollbar,
.chat-sidebar:hover::-webkit-scrollbar,
.offcanvas-body:hover::-webkit-scrollbar {
  width: 6px;
}

.sidebar:hover::-webkit-scrollbar-thumb,
.chat-sidebar:hover::-webkit-scrollbar-thumb,
.offcanvas-body:hover::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.sidebar:hover::-webkit-scrollbar-thumb:hover,
.chat-sidebar:hover::-webkit-scrollbar-thumb:hover,
.offcanvas-body:hover::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .sidebar:hover::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .chat-sidebar:hover::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .offcanvas-body:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .sidebar:hover::-webkit-scrollbar-thumb:hover,
[data-bs-theme="dark"] .chat-sidebar:hover::-webkit-scrollbar-thumb:hover,
[data-bs-theme="dark"] .offcanvas-body:hover::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Modern Sidebar (Main Navigation) - Hide scrollbar */
.modern-sidebar,
.sidebar-content,
.advanced-sidebar,
.desktop-sidebar {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  overflow-y: auto;
}

.modern-sidebar::-webkit-scrollbar,
.sidebar-content::-webkit-scrollbar,
.advanced-sidebar::-webkit-scrollbar,
.desktop-sidebar::-webkit-scrollbar {
  width: 0 !important;
  display: none !important;
}

/* Show on hover */
.modern-sidebar:hover,
.sidebar-content:hover {
  scrollbar-width: thin;
}

.modern-sidebar:hover::-webkit-scrollbar,
.sidebar-content:hover::-webkit-scrollbar {
  width: 4px;
  display: block !important;
}

.modern-sidebar:hover::-webkit-scrollbar-thumb,
.sidebar-content:hover::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

[data-bs-theme="dark"] .modern-sidebar:hover::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .sidebar-content:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   PAGE SCROLLBAR - Sleek Thin Design
   ============================================ */
/* Entire page/body scrollbar */
html,
body,
.main,
.chat-body,
.simplebar-content-wrapper {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.main::-webkit-scrollbar,
.chat-body::-webkit-scrollbar {
  width: 6px;
  background: transparent;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.main::-webkit-scrollbar-track,
.chat-body::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.main::-webkit-scrollbar-thumb,
.chat-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.main::-webkit-scrollbar-thumb:hover,
.chat-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* Dark mode page scrollbar */
[data-bs-theme="dark"] html,
[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .main,
[data-bs-theme="dark"] .chat-body {
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

[data-bs-theme="dark"] html::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] body::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .main::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .chat-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] html::-webkit-scrollbar-thumb:hover,
[data-bs-theme="dark"] body::-webkit-scrollbar-thumb:hover,
[data-bs-theme="dark"] .main::-webkit-scrollbar-thumb:hover,
[data-bs-theme="dark"] .chat-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   MOBILE PADDING - Consistent across pages
   ============================================ */
@media (max-width: 768px) {

  /* Normalize container padding */
  .main .container,
  .main .container-fluid,
  .main .container-lg,
  .main .container-xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Page titles/headings */
  .main h3,
  .main h4,
  .main .page-title {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Template page search and tabs */
  .template-search,
  .search-form,
  .nav-tabs,
  .category-tabs {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Cards on mobile */
  .template-box,
  .card,
  .shortcut-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Row margins */
  .main .row {
    margin-left: -0.5rem !important;
    margin-right: -0.5rem !important;
  }

  .main .row>[class*="col-"] {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  /* ============================================
     CHAT PAGE MOBILE - Compact List Layout
     ============================================ */

  /* Chat intro section */
  .chat-intro {
    padding: 1.5rem 1rem !important;
  }

  .chat-intro h3 {
    font-size: 1.25rem !important;
  }

  .chat-intro p {
    font-size: 0.875rem !important;
  }

  /* Assistant cards - compact list style */
  .chat-intro .row {
    gap: 0.5rem;
  }

  .chat-intro a.hover-shadow {
    flex-direction: row !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
    border-radius: 12px !important;
    min-height: auto !important;
  }

  /* Avatar in list mode */
  .chat-intro a.hover-shadow .img-thumbnail,
  .chat-intro a.hover-shadow>div:first-child {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    margin-right: 0.75rem !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
  }

  /* Text content in list mode */
  .chat-intro a.hover-shadow .fw-bold {
    font-size: 0.9rem !important;
    margin-bottom: 0.25rem !important;
  }

  .chat-intro a.hover-shadow .text-muted {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Chat input area mobile */
  .chat-footer {
    padding: 0.75rem 0.5rem 1rem !important;
  }

  .chatbox {
    padding: 4px 8px !important;
  }

  .chat-input-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }

  .chat-input-btn svg {
    width: 18px !important;
    height: 18px !important;
  }

  #prompt-input {
    min-height: 36px !important;
    height: 36px !important;
    padding: 8px 10px !important;
    font-size: 0.9rem !important;
  }

  /* ============================================
     ASSISTANT DESCRIPTION - Read More
     ============================================ */
  .assistant-description {
    position: relative;
  }

  .assistant-description .description-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .assistant-description.expanded .description-text {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
  }

  /* Read More Button */
  .read-more-btn {
    display: inline !important;
    font-size: 0.75rem !important;
    color: #4f46e5 !important;
    text-decoration: none !important;
    font-weight: 600;
    vertical-align: baseline;
  }

  .read-more-btn:hover {
    text-decoration: underline !important;
  }

  /* Chat body - no side padding on mobile */
  .chat-body {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0.5rem !important;
  }

  /* ============================================
     ASSISTANT CARDS - Clean Horizontal List
     ============================================ */

  /* Card wrapper */
  .assistant-card-wrapper {
    margin-bottom: 0.5rem !important;
    position: relative !important;
  }

  /* Horizontal card layout */
  .assistant-card-wrapper .assistant-card {
    flex-direction: row !important;
    align-items: flex-start !important;
    padding: 0.75rem !important;
    padding-bottom: 2rem !important;
    /* Space for More button and star */
    gap: 0.75rem;
  }

  /* Avatar - compact circle on left */
  .assistant-card-wrapper .assistant-avatar-section {
    width: auto !important;
    flex-shrink: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
  }

  .assistant-card-wrapper .assistant-avatar-section .img-thumbnail {
    width: 44px !important;
    height: 44px !important;
    margin-bottom: 0 !important;
  }

  .assistant-card-wrapper .assistant-avatar-section .img-thumbnail img {
    width: 44px !important;
    height: 44px !important;
  }

  /* Hide the text under avatar on mobile */
  .assistant-card-wrapper .assistant-avatar-section>div:last-child {
    display: none !important;
  }

  /* Content area */
  .assistant-card-wrapper .flex-grow-1 {
    min-height: auto !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  /* Description - truncate to 2 lines */
  .assistant-card-wrapper .assistant-description {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
  }

  /* Expanded state */
  .assistant-card-wrapper.expanded .assistant-description {
    display: block !important;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
  }

  /* Expand button - subtle pill */
  .expand-card-btn {
    position: absolute;
    bottom: 6px;
    right: 40px;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.04);
    color: #9ca3af;
    border: none;
    display: flex;
    align-items: center;
    gap: 2px;
  }

  .expand-card-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #6b7280;
  }

  .expand-card-btn svg {
    width: 10px;
    height: 10px;
  }

  [data-bs-theme="dark"] .expand-card-btn {
    background: rgba(255, 255, 255, 0.06);
    color: #6b7280;
  }

  /* Star/Pin button positioning on mobile */
  .assistant-card-wrapper>.d-flex>.position-absolute {
    bottom: 6px !important;
    right: 10px !important;
  }
}

/* Projects Page Mobile Responsiveness */
@media (max-width: 991px) {
  .projects-page .tp-header {
    margin-bottom: 2rem !important;
    text-align: center;
  }

  .projects-page .tp-header .row {
    flex-direction: column;
    gap: 1.5rem;
  }

  .projects-page .tp-header .col-auto {
    width: 100%;
  }

  .projects-page .btn-header-sleek {
    width: 100%;
    justify-content: center;
  }

  .projects-page .tp-tutorial-box {
    padding: 1.5rem !important;
  }

  .projects-page .tp-form-card {
    padding: 1.5rem;
  }
}

@media (max-width: 767px) {
  .tp-review-section {
    padding: 0.75rem;
    background-color: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem !important;
  }

  .tp-form-card {
    padding: 1rem !important;
  }
}

@media (min-width: 768px) {
  .tp-review-section {
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    border: none;
  }
}

/* ============================================
   PROJECTS LANDING PAGE - PREMIUM STYLES
   ============================================ */

/* Premium Hero Section */
.project-hero {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: 20px;
  padding: 3rem 2rem;
  color: white;
  box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.3), 0 10px 10px -5px rgba(79, 70, 229, 0.2);
  position: relative;
  overflow: hidden;
}

.project-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.project-hero h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

.project-hero .lead {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 300;
}

.hero-stats {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 0.5rem 1rem;
  display: inline-flex;
  gap: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Premium Feature Cards */
.feature-card-premium {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  height: 100%;
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature-card-premium:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #6366f1;
}

.icon-wrapper-premium {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.feature-card-premium:hover .icon-wrapper-premium {
  transform: scale(1.1) rotate(5deg);
}

.feature-card-premium h5 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.feature-card-premium p {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Modern Step Cards */
.process-steps-container {
  padding: 1rem 0;
}

.step-card-modern {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  height: 100%;
}

.step-number-classic {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  color: #e2e8f0;
  font-family: 'Martel', serif;
}

.step-content h5 {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

/* Dark Mode Adjustments */
[data-bs-theme="dark"] .project-hero {
  background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
}

[data-bs-theme="dark"] .feature-card-premium {
  background: #1e293b;
  border-color: #334155;
}

[data-bs-theme="dark"] .feature-card-premium p {
  color: #94a3b8;
}

[data-bs-theme="dark"] .step-card-modern {
  background: #1e293b;
  border-color: #334155;
}

[data-bs-theme="dark"] .step-number-classic {
  color: #334155;
}

[data-bs-theme="dark"] .step-content h5 {
  color: #e2e8f0;
}

/* ============================================
   PROJECT CREATION - PREMIUM STYLES
   ============================================ */

/* Sleek Hero */
.prj-hero-modern {
  background: radial-gradient(circle at top right, #4f46e5 0%, #1e1b4b 100%);
  border-radius: 24px;
  padding: 3rem;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
}

.prj-hero-modern::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: 0;
  width: 100%;
  height: 100px;
  background: white;
  transform: skewY(-2deg);
  opacity: 0.1;
}

.prj-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  color: #ffffff !important;
}

.project-hero h2,
.project-hero .lead,
.project-hero p,
.prj-hero-modern h1,
.prj-hero-modern h2,
.prj-hero-modern p,
.prj-hero-modern .h4 {
  color: #ffffff !important;
}

/* Sleek Radio Cards */
.radio-card-sleek {
  position: relative;
  padding: 0;
  margin-bottom: 0.75rem;
}

.radio-card-sleek input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.radio-card-sleek label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  font-weight: 500;
  color: #1e293b;
}

.radio-card-sleek label:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

/* Checked State */
.radio-card-sleek input[type="radio"]:checked+label {
  border-color: #6366f1;
  background: #eef2ff;
  color: #4f46e5;
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.1);
}

/* Custom Checkmark */
.radio-card-sleek label::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  transition: all 0.2s;
}

.radio-card-sleek input[type="radio"]:checked+label::after {
  border-color: #6366f1;
  background: #6366f1;
  box-shadow: inset 0 0 0 3px #fff;
}

/* Dark Mode */
[data-bs-theme="dark"] .radio-card-sleek label {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .radio-card-sleek label:hover {
  background: #334155;
}

[data-bs-theme="dark"] .radio-card-sleek input[type="radio"]:checked+label {
  background: rgba(99, 102, 241, 0.1);
  border-color: #818cf8;
  color: #818cf8;
}

/* Project Content Markdown Tables */
.project-content table {
  width: 100%;
  margin-bottom: 1rem;
  color: inherit;
  border-collapse: collapse;
}

.project-content th,
.project-content td {
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
}

.project-content th {
  background-color: #f8fafc;
  font-weight: 600;
}

[data-bs-theme="dark"] .project-content th,
[data-bs-theme="dark"] .project-content td {
  border-color: #334155;
}

[data-bs-theme="dark"] .project-content th {
  background-color: #1e293b;
  color: #e2e8f0;
}

/* ============================================
   SLEEK TEACHING PLAN COMPONENTS (Step 4)
   ============================================ */

/* Sleek Accordion */
.tp-accordion-sleek {
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.tp-accordion-sleek:hover {
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

.tp-accordion-header {
  user-select: none;
}

.tp-accordion-header.bg-light {
  background-color: #f8fafc !important;
}

/* Sleek Checkbox Card */
.tp-checkbox-sleek {
  border-color: #e2e8f0;
  transition: all 0.2s ease;
  cursor: pointer;
}

.tp-checkbox-sleek:hover {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
}

.tp-checkbox-sleek .form-check-input {
  width: 1.25em;
  height: 1.25em;
  cursor: pointer;
}

.tp-checkbox-sleek .form-check-input:checked {
  background-color: #4f46e5;
  border-color: #4f46e5;
}

/* Selection Overlay Effect */
.selection-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  pointer-events: none;
  transition: all 0.3s ease;
  opacity: 0;
  box-shadow: inset 0 0 0 2px #4f46e5;
}

.tp-checkbox-sleek input:checked~.selection-overlay {
  opacity: 1;
}

/* Stats Card Icons */
.rounded-circle.bg-opacity-10 {
  --bs-bg-opacity: 0.1;
}

/* Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tp-accordion-content {
  animation: slideDown 0.3s ease-out forwards;
}