/* CSS do Módulo de Estoque e Ficha Técnica */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link:hover {
  color: #f8fafc;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: #ea580c;
  color: #fff;
}
.btn-primary:hover {
  background: #c2410c;
}

.btn-secondary {
  background: #334155;
  color: #f8fafc;
}
.btn-secondary:hover {
  background: #475569;
}

.btn-accent {
  background: #10b981;
  color: #fff;
}
.btn-accent:hover {
  background: #059669;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 20px;
}

.kpi-title {
  font-size: 0.875rem;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  color: #f8fafc;
}

.kpi-sub {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 4px;
}

.kpi-card.warning .kpi-value { color: #f59e0b; }
.kpi-card.danger .kpi-value { color: #ef4444; }
.kpi-card.success .kpi-value { color: #10b981; }

/* Filtros */
.category-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.filter-btn {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.filter-btn:hover, .filter-btn.active {
  background: #ea580c;
  color: #fff;
  border-color: #ea580c;
}

/* Glass Table */
.glass-table-container {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  border-radius: 14px;
  overflow: hidden;
}

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

.inventory-table th {
  background: rgba(15, 23, 42, 0.8);
  padding: 14px 18px;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.inventory-table td {
  padding: 14px 18px;
  font-size: 0.9rem;
  color: #f1f5f9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.inventory-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge.available { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge.critical { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge.out { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.toggle-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #cbd5e1;
  transition: all 0.2s;
}

.toggle-btn.btn-pause {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}
.toggle-btn.btn-pause:hover {
  background: rgba(245, 158, 11, 0.15);
}

.toggle-btn.btn-resume {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}
.toggle-btn.btn-resume:hover {
  background: rgba(16, 185, 129, 0.15);
}

/* Modais */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-card.large {
  max-width: 780px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 1.25rem;
}

.close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #f8fafc;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Ficha Técnica */
.recipe-summary-box {
  display: flex;
  justify-content: space-between;
  background: #0f172a;
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.highlight-green { color: #10b981; font-weight: 700; }
.highlight-blue { color: #38bdf8; font-weight: 700; }

.recipe-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.recipe-row {
  display: grid;
  grid-template-columns: 2fr 1fr 40px;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.remove-row-btn {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
