/* Queli Design System - Light Theme Only */

/* ===================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   =================================== */

:root {
  /* Color System - Light Mode */
  --background: #F5F5F5;           /* Main background */
  --foreground: #2D2D2D;           /* Main text */
  
  --muted: #FFFFFF;                /* Muted background */
  --muted-foreground: #6B6B78;     /* Muted text */
  
  --card: #FFFFFF;                 /* Card background */
  --card-foreground: #2D2D2D;      /* Card text */
  
  --border: #A1A1A1;               /* Border color */
  --input-border: #A1A1A1;         /* Input border */
  
  --primary: #BFFF6F;              /* Lime green */
  --primary-foreground: #2D2D2D;   /* Text on primary */
  
  --secondary: #6FF4FF;            /* Cyan */
  --secondary-foreground: #2D2D2D; /* Text on secondary */
  
  --accent: #FFF76F;               /* Yellow */
  --accent-foreground: #2D2D2D;    /* Text on accent */
  
  --destructive: #EF4444;          /* Red */
  --destructive-foreground: #FFFFFF; /* Text on destructive */
  
  --success: #10B981;              /* Green */
  --warning: #F59E0B;              /* Orange */
  --info: #3B82F6;                 /* Blue */
  
  /* Border Radius */
  --radius: 0.5rem;                /* 8px - base border radius */
  --radius-sm: 0.375rem;           /* 6px - small radius */
  --radius-md: 0.625rem;           /* 10px - medium radius */
  --radius-lg: 1rem;               /* 16px - large radius */
  --radius-xl: 1.25rem;            /* 20px - extra large radius - premium bento boxes */
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Spacing Scale (matches Tailwind) */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-12: 3rem;    /* 48px */
}

/* ===================================
   GLOBAL OVERRIDES
   =================================== */

body {
  font-family: 'GT Eesti Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

/* ===================================
   BOOTSTRAP OVERRIDES
   =================================== */

/* Override Bootstrap's primary color */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
  font-weight: 500;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #A8E65E;
  border-color: #A8E65E;
  color: var(--primary-foreground);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:focus {
  background-color: #A8E65E;
  border-color: #A8E65E;
  box-shadow: 0 0 0 0.2rem rgba(191, 255, 111, 0.5);
}

/* Success button - Queli Lime Green */
.btn-success {
  background: linear-gradient(135deg, #BFFF6F, #A8E65E);
  border: none;
  color: #2D2D2D;
  border-radius: var(--radius-md);
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(191, 255, 111, 0.3);
  transition: all 0.3s ease;
}

.btn-success:hover {
  background: linear-gradient(135deg, #A8E65E, #95D34D);
  color: #2D2D2D;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(191, 255, 111, 0.4);
}

/* Danger/Destructive button */
.btn-danger {
  background-color: var(--destructive);
  border-color: var(--destructive);
  border-radius: var(--radius-md);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.btn-danger:hover {
  background-color: #DC2626;
  border-color: #DC2626;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Outline button */
.btn-outline-primary {
  border-color: var(--border);
  color: var(--foreground);
  background-color: transparent;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background-color: #F9FAFB;
  border-color: var(--primary);
  color: var(--foreground);
}

.btn-outline-secondary {
  border-color: var(--border);
  color: var(--foreground);
  background-color: transparent;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
  background-color: #F9FAFB;
  border-color: var(--border);
  color: var(--foreground);
}

/* Small buttons */
.btn-sm {
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
}

/* General button styles */
.btn {
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.3s ease;
}

/* Cards */
.card {
  background-color: var(--card);
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  color: var(--card-foreground);
  transition: box-shadow 0.3s ease;
}

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

.card-header {
  background-color: var(--card);
  border-bottom: 1px solid #E5E7EB;
  font-weight: 500;
  padding: 1.5rem;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background-color: var(--card);
  border-top: 1px solid #E5E7EB;
  padding: 1.5rem;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.card-title {
  font-weight: 450;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
  color: var(--card-foreground);
}

.card-text {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Forms */
.form-control {
  background-color: var(--card);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--foreground);
  padding: 0.75rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.form-control:focus {
  border-color: var(--primary);
  background-color: var(--card);
  color: var(--foreground);
  box-shadow: 0 0 0 0.2rem rgba(191, 255, 111, 0.25);
  outline: none;
}

.form-control::placeholder {
  color: var(--muted-foreground);
}

.form-label {
  color: var(--foreground);
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.form-text {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Form select */
.form-select {
  background-color: var(--card);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}

.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(191, 255, 111, 0.25);
}

/* Textarea */
textarea.form-control {
  resize: vertical;
}

/* Alerts */
.alert {
  border: none;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.alert-success {
  background-color: #D1FAE5;
  color: #065F46;
  border-left: 4px solid var(--success);
}

.alert-danger {
  background-color: #FEE2E2;
  color: #991B1B;
  border-left: 4px solid var(--destructive);
}

.alert-info {
  background-color: #DBEAFE;
  color: #1E40AF;
  border-left: 4px solid var(--info);
}

.alert-warning {
  background-color: #FEF3C7;
  color: #92400E;
  border-left: 4px solid var(--warning);
}

/* Badges */
.badge {
  border-radius: var(--radius-md);
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.badge.bg-success {
  background-color: #D1FAE5 !important;
  color: var(--success) !important;
}

.badge.bg-danger {
  background-color: #FEE2E2 !important;
  color: var(--destructive) !important;
}

.badge.bg-warning {
  background-color: #FEF3C7 !important;
  color: var(--warning) !important;
}

.badge.bg-info {
  background-color: #DBEAFE !important;
  color: var(--info) !important;
}

.badge.bg-primary {
  background-color: var(--primary) !important;
  color: var(--primary-foreground) !important;
}

.badge.bg-secondary {
  background-color: #F3F4F6 !important;
  color: #4B5563 !important;
}

/* Navigation */
.navbar {
  background-color: var(--card) !important;
  border-bottom: 1px solid #E5E7EB;
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
}

.navbar-brand {
  color: var(--foreground) !important;
  font-weight: 450;
  font-size: 1.25rem;
}

.navbar-brand:hover {
  color: var(--foreground) !important;
}

.nav-link {
  color: var(--muted-foreground) !important;
  font-weight: 400;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--foreground) !important;
}

/* Dropdowns */
.dropdown-menu {
  background-color: var(--card);
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
}

.dropdown-item {
  color: var(--foreground);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: #F9FAFB;
  color: var(--foreground);
}

.dropdown-divider {
  border-top: 1px solid #E5E7EB;
  margin: 0.5rem 0;
}

.dropdown-toggle {
  border-radius: var(--radius-md);
}

/* Tables */
.table {
  color: var(--foreground);
  background-color: var(--card);
}

.table thead th {
  background-color: #F9FAFB;
  color: var(--foreground);
  font-weight: 450;
  border-bottom: 2px solid #E5E7EB;
  padding: 0.75rem;
}

.table tbody td {
  padding: 0.75rem;
  border-bottom: 1px solid #E5E7EB;
}

.table-hover tbody tr:hover {
  background-color: #F9FAFB;
}

.table-bordered {
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Modals */
.modal-content {
  background-color: var(--card);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid #E5E7EB;
  padding: 1.5rem;
  background-color: var(--card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-title {
  color: var(--foreground);
  font-weight: 450;
  font-size: 1.25rem;
}

.modal-body {
  padding: 1.5rem;
  color: var(--foreground);
}

.modal-footer {
  border-top: 1px solid #E5E7EB;
  padding: 1.5rem;
  background-color: var(--card);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Progress bars */
.progress {
  background-color: #E5E7EB;
  border-radius: var(--radius);
  height: 0.5rem;
  overflow: hidden;
}

.progress-bar {
  background-color: var(--primary);
  transition: width 0.6s ease;
}

.progress-bar-striped {
  background-image: linear-gradient(
    45deg,
    rgba(45, 45, 45, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(45, 45, 45, 0.15) 50%,
    rgba(45, 45, 45, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1rem 1rem;
}

/* Spinners */
.spinner-border {
  color: var(--primary);
}

/* Breadcrumbs */
.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin-bottom: 1rem;
}

.breadcrumb-item {
  color: var(--muted-foreground);
}

.breadcrumb-item.active {
  color: var(--foreground);
}

/* Pagination */
.pagination {
  gap: 0.25rem;
}

.page-link {
  background-color: var(--card);
  border: 1px solid #E5E7EB;
  color: var(--foreground);
  border-radius: var(--radius-sm);
  margin: 0 0.125rem;
  transition: all 0.2s ease;
}

.page-link:hover {
  background-color: #F9FAFB;
  border-color: var(--primary);
  color: var(--foreground);
}

.page-item.active .page-link {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.text-muted {
  color: var(--muted-foreground) !important;
}

.bg-light {
  background-color: #F9FAFB !important;
}

.border {
  border-color: #E5E7EB !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow {
  box-shadow: var(--shadow) !important;
}

.shadow-md {
  box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

.rounded {
  border-radius: var(--radius) !important;
}

.rounded-sm {
  border-radius: var(--radius-sm) !important;
}

.rounded-md {
  border-radius: var(--radius-md) !important;
}

.rounded-lg {
  border-radius: var(--radius-lg) !important;
}

.rounded-xl {
  border-radius: var(--radius-xl) !important;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
  .card {
    border-radius: var(--radius-md);
  }
  
  .card-header,
  .card-body,
  .card-footer {
    padding: 1rem;
  }
  
  .btn {
    padding: 0.5rem 1rem;
  }
}

/* ===================================
   ANIMATION UTILITIES
   =================================== */

.transition-all {
  transition: all 0.3s ease;
}

.transition-colors {
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Hover effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* ===================================
   DASHBOARD STYLES
   =================================== */

/* Glassmorphism Hero Card */
.glass-hero-card {
  background: linear-gradient(135deg, rgba(191, 255, 111, 0.15), rgba(111, 244, 255, 0.15));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.glass-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(191, 255, 111, 0.1), transparent 70%);
  pointer-events: none;
}

.glass-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.glass-hero-icon {
  font-size: 64px;
  color: var(--primary);
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

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

.glass-hero-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.glass-hero-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-bottom: 0;
}

/* Upload Dropzone */
.upload-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.upload-dropzone::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.upload-dropzone:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(191, 255, 111, 0.2);
}

.upload-dropzone:hover::before {
  opacity: 0.1;
}

.upload-dropzone-label {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

.upload-dropzone-label i {
  font-size: 48px;
  color: var(--primary);
}

.upload-text {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.upload-subtext {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Drag and drop active state */
.upload-dropzone.drag-active {
  border-color: var(--primary);
  background: rgba(191, 255, 111, 0.15);
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(191, 255, 111, 0.3);
}

.upload-dropzone.drag-active::before {
  opacity: 0.2;
}

.upload-dropzone.drag-active .upload-text {
  color: var(--primary);
}

/* Bento Boxes */
.bento-box {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.bento-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.bento-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.bento-box:hover::before {
  opacity: 1;
}

/* Gradient variants */
.bento-gradient-lime::before {
  background: linear-gradient(135deg, rgba(191, 255, 111, 0.2), rgba(168, 230, 94, 0.2));
}

.bento-gradient-cyan::before {
  background: linear-gradient(135deg, rgba(111, 244, 255, 0.2), rgba(90, 210, 220, 0.2));
}

.bento-gradient-yellow::before {
  background: linear-gradient(135deg, rgba(255, 247, 111, 0.2), rgba(240, 220, 90, 0.2));
}

.bento-gradient-white::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(245, 245, 245, 0.3));
}

.bento-icon {
  font-size: 32px;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.bento-gradient-lime .bento-icon {
  color: #95D34D;
}

.bento-gradient-cyan .bento-icon {
  color: #5AD2DC;
}

.bento-gradient-yellow .bento-icon {
  color: #E0DC5A;
}

.bento-gradient-white .bento-icon {
  color: var(--muted-foreground);
}

.bento-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.bento-value-sm {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.2;
  margin-bottom: 0.5rem;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}

.bento-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.bento-sublabel {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Recent Invoice Cards */
.recent-invoice-card {
  padding: 1rem;
  border-bottom: 1px solid rgba(161, 161, 161, 0.2);
  transition: all 0.2s ease;
}

.recent-invoice-card:last-child {
  border-bottom: none;
}

.recent-invoice-card:hover {
  background: rgba(191, 255, 111, 0.05);
  transform: translateX(4px);
}

/* Supplier Bar Items */
.supplier-bar-item {
  transition: all 0.2s ease;
}

.supplier-bar-item:hover {
  transform: translateX(4px);
}

.bg-gradient-lime {
  background: linear-gradient(90deg, var(--primary), #A8E65E) !important;
}

/* Progress bar animation */
.progress-bar {
  transition: width 0.6s ease;
}

/* Card enhancements */
.card {
  border: 1px solid rgba(161, 161, 161, 0.15);
  transition: all 0.3s ease;
}

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

.card-header {
  background: rgba(245, 245, 245, 0.5);
  border-bottom: 1px solid rgba(161, 161, 161, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .glass-hero-card {
    padding: 2rem 1.5rem;
  }
  
  .glass-hero-title {
    font-size: 1.5rem;
  }
  
  .glass-hero-subtitle {
    font-size: 1rem;
  }
  
  .bento-box {
    padding: 1.25rem;
  }
  
  .bento-value {
    font-size: 2rem;
  }
}
