/* Estils personalitzats per al Sistema de Nutrició & Rebost */
:root {
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --primary-border: #10b981;
  --surface-light: #f6f7f5;
  --surface-dark: #0b0f14;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  background-color: var(--surface-light);
}

.dark body {
  background-color: var(--surface-dark);
  color: #f1f5f9;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.pb-safe {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Taula Cooking for Engineers */
.cfe-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  background: white;
}

.cfe-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.cfe-table th {
  background-color: #f9fafb;
  color: #374151;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 12px;
  border-bottom: 2px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cfe-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  font-size: 0.9rem;
  vertical-align: middle;
}

.cfe-table tr:hover td:not(.cfe-step-cell) {
  background-color: #f8fafc;
}

.cfe-step-cell {
  background-color: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  border-left: 4px solid #10b981 !important;
  color: #064e3b;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: inset 0 0 4px rgba(16, 185, 129, 0.05);
  transition: all 0.15s ease-in-out;
}

.cfe-step-cell:hover {
  background-color: #d1fae5 !important;
  border-color: #34d399 !important;
}

.cfe-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background-color: #059669;
  color: white;
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 6px;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Modal & Bottom Sheet Animations */
.modal-enter {
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.sheet-panel {
  animation: sheetSlideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes sheetSlideUp {
  from {
    opacity: 0.4;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-fade-in {
  animation: tabFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* FAB Speed Dial */
.fab-main-icon {
  transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fab-open .fab-main-icon {
  transform: rotate(45deg);
}

.fab-item {
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  transition: opacity 0.18s ease, transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.fab-open .fab-item {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.fab-open .fab-item:nth-child(1) { transition-delay: 90ms; }
.fab-open .fab-item:nth-child(2) { transition-delay: 45ms; }
.fab-open .fab-item:nth-child(3) { transition-delay: 0ms; }
