/* Custom styles for the Sales Simulator */

/* Smooth transitions */
* {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

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

::-webkit-scrollbar-track {
  background: #1f2937;
}

::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Tab animations */
.tab-content {
  animation: fadeIn 0.3s ease;
}

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

/* Editable cell styling */
.editable-cell {
  cursor: pointer;
  position: relative;
}

.editable-cell:hover {
  background-color: rgba(59, 130, 246, 0.2);
}

.editable-cell.modified {
  background-color: rgba(234, 179, 8, 0.2);
  border: 1px solid rgba(234, 179, 8, 0.5);
}

.editable-cell input {
  width: 100%;
  background: #374151;
  border: 2px solid #3b82f6;
  border-radius: 4px;
  padding: 4px 8px;
  text-align: center;
  color: white;
  outline: none;
}

/* Stock status colors */
.stock-ok {
  color: #10b981;
}

.stock-low {
  color: #f59e0b;
}

.stock-critical {
  color: #ef4444;
  animation: pulse 2s infinite;
}

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

/* Alert badge */
.alert-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Vessel status badges */
.status-scheduled {
  background-color: #3b82f6;
}

.status-in_transit {
  background-color: #f59e0b;
}

.status-arrived {
  background-color: #10b981;
}

.status-delayed {
  background-color: #ef4444;
}

/* Timeline styling */
.timeline-month {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  border-right: 1px solid #4b5563;
  font-size: 12px;
}

.timeline-month:last-child {
  border-right: none;
}

.timeline-vessel {
  position: absolute;
  height: 30px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s;
}

.timeline-vessel:hover {
  transform: scale(1.05);
  z-index: 10;
}

/* Alert cards */
.alert-card {
  border-left: 4px solid;
  padding: 12px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 8px;
}

.alert-card.critical {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.alert-card.warning {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.alert-card.info {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

/* Button hover effects */
button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

/* Modal overlay */
.modal-overlay {
  backdrop-filter: blur(4px);
}

/* Table row hover */
tbody tr:hover {
  background-color: rgba(75, 85, 99, 0.3);
}

/* Sticky first column */
.sticky-col {
  position: sticky;
  left: 0;
  z-index: 5;
}

/* Number formatting */
.number-cell {
  font-family: 'Courier New', monospace;
  font-weight: 500;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Card hover effect */
.hover-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* Loading spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top: 3px solid #3b82f6;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 24px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

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

.toast.success {
  background: #10b981;
}

.toast.error {
  background: #ef4444;
}

.toast.warning {
  background: #f59e0b;
}

/* Chart container */
.chart-container {
  position: relative;
  height: 320px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tab-btn {
    font-size: 12px;
    padding: 8px 4px;
  }
  
  .tab-btn i {
    display: none;
  }
}
