/* Google Fonts loaded via <link> in index.html (faster than CSS @import) */

/* ========================================
   Brand Color Utility Classes
   These use CSS variables set by BrandThemeProvider
   ======================================== */

/* Background colors */
.bg-brand-primary {
  background-color: #6D28FF !important;
  background-color: var(--color-primary, #6D28FF) !important;
}

/* Text colors */
.text-brand-primary {
  color: #6D28FF !important;
  color: var(--color-primary, #6D28FF) !important;
}

/* Hover states */
.hover\:bg-brand-primary:hover {
  background-color: #6D28FF !important;
  background-color: var(--color-primary, #6D28FF) !important;
  filter: brightness(0.9);
}
.hover\:text-brand-primary:hover {
  color: #6D28FF !important;
  color: var(--color-primary, #6D28FF) !important;
}

/* Text gradient */
.text-brand-gradient {
  background: linear-gradient(135deg, #6D28FF, #FFD400);
  background: linear-gradient(135deg, var(--color-primary, #6D28FF), var(--color-accent, #FFD400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Ring/outline colors */
.ring-brand-primary {
  --tw-ring-color: var(--color-primary, #6D28FF) !important;
}
.focus\:ring-brand-primary:focus {
  --tw-ring-color: var(--color-primary, #6D28FF) !important;
}

/* ======================================== */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f8fafc;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

.App {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Performance optimizations */
img {
  max-width: 100%;
  height: auto;
  loading: lazy;
}

/* Will-change for animated elements */
.animate-spin,
.hover-lift:hover,
.card-hover:hover {
  will-change: transform;
}

/* Optimize repaints */
.gradient-primary,
.gradient-secondary,
.gradient-success {
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  transform: translateZ(0);
}

/* Mobile-first responsive design */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* MOBILE FIXES */

/* Fix dashboard header responsive issues */
.dashboard-header {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .dashboard-header {
    padding: 0.75rem;
    flex-wrap: wrap;
  }
  
  .dashboard-header > div {
    width: 100%;
    max-width: 100%;
  }
}

/* Fix horizontal scroll issues */
.no-horizontal-scroll {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Mobile tab scroll fix - only horizontal scroll */
.mobile-tab-container {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.mobile-tab-container::-webkit-scrollbar {
  height: 2px;
}

.mobile-tab-container::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.mobile-tab-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 1px;
}

/* Responsive button text fixes */
@media (max-width: 640px) {
  .mobile-btn-text {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }
  
  .mobile-stack-vertical {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .mobile-stack-vertical button {
    width: 100%;
  }
}

.enhanced-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  background: rgba(148, 163, 184, 0.1);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.enhanced-modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  transform: scale(1.05);
}

/* Button micro animations with gradient effects */
.btn-animated {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  background-size: 200% 200%;
}

.btn-animated:hover {
  background-position: right center;
  transform: translateY(-1px);
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

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

.btn-animated::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-animated:hover::before {
  left: 100%;
}

/* Success button animation */
.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  background-size: 200% 200%;
}

.btn-success:hover {
  background-position: right center;
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
}

/* Danger button animation */
.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  background-size: 200% 200%;
}

.btn-danger:hover {
  background-position: right center;
  box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.4);
}

/* Card animations */
.card-animated {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-animated:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
              0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Mobile responsive cards */
@media (max-width: 640px) {
  
}

/* Micro animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* Animation classes */
.animate-slide-up {
  animation: slideInUp 0.3s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.2s ease-out;
}

.animate-pulse-subtle {
  animation: pulse 2s infinite;
}

.animate-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

/* Enhanced button interactions */
.btn-hover-lift {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hover-lift:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-hover-lift:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Enhanced card interactions */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Mobile touch improvements */
@media (max-width: 480px) {
  /* Extra small mobile screens */
  .xs\:hidden {
    display: none;
  }
}

@media (min-width: 481px) {
  .xs\:inline {
    display: inline;
  }
}

@media (max-width: 768px) {
  .grid:not(.preserve-responsive) {
    grid-template-columns: 1fr !important;
  }
  
  .max-w-7xl {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .text-5xl {
    font-size: 2.5rem;
  }
  
  .text-6xl {
    font-size: 3rem;
  }
  
  /* Touch-friendly buttons */
  button {
    min-height: 44px;
    min-width: 44px;
  }
  
  
  
  /* Improved tap targets */
  [role="button"], button, .btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Better spacing for mobile */
  .space-x-2 > :not([hidden]) ~ :not([hidden]) {
    margin-left: 0.75rem;
  }
  
  .space-y-2 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.75rem;
  }
  
  /* Optimize fonts for mobile */
  body {
    font-size: 16px;
    line-height: 1.5;
  }
  
  /* Improve form inputs */
  input, textarea, select {
    font-size: 16px; /* Prevent zoom on iOS */
    min-height: 44px;
  }
  
  /* Better modal sizing */
  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }
  
  
  
  
  
  /* Better mobile tab sizing */
  [role="tablist"] button {
    min-width: auto;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}
  
  .space-x-8 > * + * {
    margin-left: 1rem !important;
  }
  
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }
  
  .lg\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .md\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .md\:grid-cols-3 {
    grid-template-columns: 1fr;
  }

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Custom animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glassmorphism effect */
.glass {
  background: rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Hover transitions */
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Card hover effects */
.card-hover:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
  transition: all 0.2s ease-in-out;
}

/* Button focus */
button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Custom gradient backgrounds */
.gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-secondary {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-success {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Responsive typography */
@media (max-width: 640px) {
  
}

/* Enhanced mobile navigation */
@media (max-width: 768px) {
  
}

/* Custom checkbox styles */
.custom-checkbox {
  -webkit-appearance: none;
          appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #d1d5db;
  border-radius: 0.25rem;
  background: white;
  cursor: pointer;
  position: relative;
}

.custom-checkbox:checked {
  background: #6366f1;
  border-color: #6366f1;
}

.custom-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 0.875rem;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #ededed;
  }
}

/* Print styles */
@media print {
  
  
  body {
    background: white !important;
    color: black !important;
  }
}

/* Task Modal Mobile Responsive Improvements */
@media (max-width: 768px) {
  
  
  /* Horizontal scrollable tabs for mobile */
  .mobile-tabs-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  
  .mobile-tabs-scroll::-webkit-scrollbar {
    height: 3px;
  }
  
  .mobile-tabs-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
  }
  
  .mobile-tabs-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
  }
  
  .mobile-tabs-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
  }
  
  /* Tab buttons mobile styling */
  .mobile-tab-button {
    flex-shrink: 0;
    white-space: nowrap;
    min-width: -webkit-fit-content;
    min-width: fit-content;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
  }
  
  .mobile-tab-button.active {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
  }
  
  
  
  
  
  
  
  
  
  .mobile-step-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
  }
  
  .mobile-step-dot.active {
    background: #6366f1;
  }
  
  .mobile-step-dot.inactive {
    background: #d1d5db;
  }
}

/* Enhanced button mobile styles */
@media (max-width: 640px) {
  .mobile-button-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  
  .mobile-button-stack button {
    width: 100%;
    justify-content: center;
  }
  
  .mobile-button-group {
    display: flex;
    gap: 0.5rem;
    width: 100%;
  }
  
  .mobile-button-group button {
    flex: 1 1;
    min-height: 44px;
  }
}

/* Animation utilities */
.animate-in {
  animation: slideInUp 0.3s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.2s ease-out;
}

/* Task status mobile improvements */
@media (max-width: 640px) {
  
  
  
}

/* Button focus states for accessibility */
.btn-animated:focus,
.btn-success:focus,
.btn-danger:focus {
  outline: 2px solid rgba(99, 102, 241, 0.5);
  outline-offset: 2px;
}

/* Gradient Button Styles - instantly.ai inspired */
.gradient-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  padding: 12px 24px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.gradient-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.gradient-button-secondary {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  padding: 12px 24px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.gradient-button-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
  background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

.gradient-button-success {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  padding: 12px 24px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.gradient-button-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}

/* Modern Card Styles */
.modern-card {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.modern-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.15);
}

/* Enhanced input styles */
.modern-input {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  transition: all 0.3s ease;
  font-size: 14px;
}

.modern-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}


/* Make clicks pass-through */
#nprogress {
  pointer-events: none;
}

#nprogress .bar {
  background: #29d;

  position: fixed;
  z-index: 1031;
  top: 0;
  left: 0;

  width: 100%;
  height: 2px;
}

/* Fancy blur effect */
#nprogress .peg {
  display: block;
  position: absolute;
  right: 0px;
  width: 100px;
  height: 100%;
  box-shadow: 0 0 10px #29d, 0 0 5px #29d;
  opacity: 1.0;
  transform: rotate(3deg) translate(0px, -4px);
}

/* Remove these to get rid of the spinner */
#nprogress .spinner {
  display: block;
  position: fixed;
  z-index: 1031;
  top: 15px;
  right: 15px;
}

#nprogress .spinner-icon {
  width: 18px;
  height: 18px;
  box-sizing: border-box;

  border: solid 2px transparent;
  border-top-color: #29d;
  border-left-color: #29d;
  border-radius: 50%;
  animation: nprogress-spinner 400ms linear infinite;
}

.nprogress-custom-parent {
  overflow: hidden;
  position: relative;
}

.nprogress-custom-parent #nprogress .spinner,
.nprogress-custom-parent #nprogress .bar {
  position: absolute;
}
@keyframes nprogress-spinner {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


