/* Monetum CRM Simplified Kanban Styles */
:root {
  --monetum-green: #86E8C6;
  --monetum-green-dark: #5FDCB8;
  --monetum-green-light: #B8F5E1;
  --monetum-dark: #2D3436;
  --monetum-gray: #636E72;
}

/* Monetum brand utilities */
.bg-monetum-green { 
  background-color: var(--monetum-green) !important; 
}

.bg-monetum-green-dark { 
  background-color: var(--monetum-green-dark) !important; 
}

.bg-monetum-green-light { 
  background-color: var(--monetum-green-light) !important; 
}

.text-monetum-green { 
  color: var(--monetum-green) !important; 
}

.text-monetum-green-dark { 
  color: var(--monetum-green-dark) !important; 
}

.border-monetum-green { 
  border-color: var(--monetum-green) !important; 
}

.ring-monetum-green {
  --tw-ring-color: var(--monetum-green) !important;
}

/* Focus states */
.focus\:ring-monetum-green:focus {
  --tw-ring-color: var(--monetum-green) !important;
}

.focus\:border-monetum-green:focus {
  border-color: var(--monetum-green) !important;
}

/* Hover states */
.hover\:bg-monetum-green-dark:hover {
  background-color: var(--monetum-green-dark) !important;
}

.hover\:text-monetum-green-dark:hover {
  color: var(--monetum-green-dark) !important;
}

/* Monetum Logo Styles - Official Design */
.monetum-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 3rem;
  animation: logoFadeIn 0.8s ease-out;
}

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

.logo-symbol {
  position: relative;
  width: 90px;
  height: 90px;
  margin-bottom: 1.5rem;
}

.logo-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #86E8C6;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px rgba(134, 232, 198, 0.3), 0 10px 25px rgba(134, 232, 198, 0.15);
  position: relative;
  overflow: hidden;
}

.logo-circle::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  border-radius: 50%;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-100%) rotate(45deg); }
  50% { transform: translateX(100%) rotate(45deg); }
}

/* Official Monetum Symbol - Stylized M with geometric pattern */
.monetum-symbol {
  width: 50px;
  height: 50px;
  position: relative;
  z-index: 2;
}

.monetum-symbol svg {
  width: 100%;
  height: 100%;
  fill: #2D3436;
}

.logo-text {
  font-size: 2.8rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo-tagline {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  letter-spacing: 0.08em;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  text-align: center;
  opacity: 0.9;
}

/* Small logo for header - Official Design */
.monetum-logo-small {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-circle-small {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #86E8C6;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 15px rgba(134, 232, 198, 0.25), 0 3px 8px rgba(134, 232, 198, 0.15);
  position: relative;
}

.monetum-symbol-small {
  width: 24px;
  height: 24px;
}

.monetum-symbol-small svg {
  width: 100%;
  height: 100%;
  fill: #2D3436;
}

.logo-text-small {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--monetum-dark);
  letter-spacing: 0.05em;
}

/* Kanban Board Styles */
.kanban-column-simplified {
  min-height: 500px;
  transition: all 0.3s ease;
}

.kanban-drop-zone-simplified {
  transition: all 0.2s ease;
}

.kanban-drop-zone-simplified.bg-monetum-green\/10 {
  background-color: rgba(134, 232, 198, 0.1) !important;
}

.client-card-simplified {
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.client-card-simplified:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.client-card-simplified[draggable="true"]:hover {
  cursor: grab;
}

.client-card-simplified[draggable="true"]:active {
  cursor: grabbing;
}

/* Gradient backgrounds */
.bg-gradient-monetum {
  background: linear-gradient(135deg, var(--monetum-green-light) 0%, var(--monetum-green) 100%);
}

/* Custom scrollbar */
.kanban-drop-zone-simplified::-webkit-scrollbar {
  width: 6px;
}

.kanban-drop-zone-simplified::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.kanban-drop-zone-simplified::-webkit-scrollbar-thumb {
  background: var(--monetum-green);
  border-radius: 3px;
}

.kanban-drop-zone-simplified::-webkit-scrollbar-thumb:hover {
  background: var(--monetum-green-dark);
}

/* Animation for status flags */
.status-flag-red {
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% { 
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

/* Stale indicator animation */
.stale-indicator {
  animation: blink 1s infinite alternate;
}

@keyframes blink {
  0% { opacity: 1; }
  100% { opacity: 0.7; }
}

/* Card priority indicators */
.priority-high {
  border-left-width: 6px !important;
  animation: urgent-pulse 2s infinite;
}

@keyframes urgent-pulse {
  0%, 100% { border-left-color: #ef4444; }
  50% { border-left-color: #f87171; }
}

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

/* Loading spinner */
.spinner-monetum {
  border: 3px solid rgba(134, 232, 198, 0.3);
  border-top: 3px solid var(--monetum-green);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

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

/* Button enhancements */
.btn-monetum {
  background: linear-gradient(135deg, var(--monetum-green) 0%, var(--monetum-green-dark) 100%);
  color: var(--monetum-dark);
  font-weight: 600;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(134, 232, 198, 0.3);
}

.btn-monetum:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(134, 232, 198, 0.4);
}

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

/* Form inputs */
.input-monetum {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.input-monetum:focus {
  border-color: var(--monetum-green);
  box-shadow: 0 0 0 3px rgba(134, 232, 198, 0.1);
  outline: none;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .monetum-logo {
    margin-bottom: 2rem;
  }
  
  .logo-circle {
    width: 70px;
    height: 70px;
  }
  
  .monetum-symbol {
    width: 38px;
    height: 38px;
  }
  
  .logo-text {
    font-size: 2.2rem;
  }
  
  .client-card-simplified {
    margin-bottom: 0.5rem;
  }
  
  .kanban-column-simplified {
    min-height: 400px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .client-card-simplified {
    background: rgba(255, 255, 255, 0.95);
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .client-card-simplified {
    border: 2px solid var(--monetum-dark);
  }
  
  .btn-monetum {
    border: 2px solid var(--monetum-dark);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .client-card-simplified,
  .btn-monetum,
  .kanban-column-simplified {
    transition: none;
  }
  
  .status-flag-red,
  .stale-indicator {
    animation: none;
  }
}

/* Toast Notification System */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  max-width: 400px;
  width: 100%;
}

.toast {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 12px;
  overflow: hidden;
  transform: translateX(100%);
  transition: all 0.3s ease;
  border-left: 4px solid;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left-color: #10b981;
}

.toast.error {
  border-left-color: #ef4444;
}

.toast.warning {
  border-left-color: #f59e0b;
}

.toast.info {
  border-left-color: var(--monetum-green);
}

.toast-content {
  padding: 16px 20px;
  display: flex;
  align-items: start;
  gap: 12px;
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.toast-message {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
  margin-bottom: 4px;
}

.toast-description {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

.toast-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
}

.toast-close:hover {
  color: #6b7280;
  background: #f3f4f6;
}

.toast-progress {
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.toast-progress-bar {
  height: 100%;
  background: currentColor;
  width: 100%;
  animation: toastProgress linear;
  transform-origin: left;
}

@keyframes toastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* Loading States */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

/* Form Validation States */
.input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.input-success {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.error-message {
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.success-message {
  color: #10b981;
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Enhanced Button States */
.btn-monetum:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* Mobile Responsiveness Improvements */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .toast-content {
    padding: 12px 16px;
  }
  
  .loading-spinner {
    width: 40px;
    height: 40px;
  }
  
  .modal-backdrop .bg-white {
    margin: 10px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }
}