.App {
  min-height: 100vh;
  background-color: #f8fafc;
}

/* Componentes personalizados */
.card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

/* Estilos para empréstimos */
.description-text {
  color: #64748b;
  font-size: 13px;
  font-style: italic;
  max-width: 200px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card:hover {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  min-height: 40px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.btn-secondary:hover:not(:disabled) {
  background: #e2e8f0;
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.btn-warning:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 32px;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 16px;
  min-height: 48px;
}

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

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input:invalid {
  border-color: #ef4444;
}

.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.table th {
  background: #f8fafc;
  padding: 16px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

.table td {
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}

.table tr:hover {
  background: #f9fafb;
}

.table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .modal {
    margin: 10px;
    padding: 16px;
  }
  
  .table {
    font-size: 12px;
  }
  
  .table th,
  .table td {
    padding: 8px;
  }
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #6b7280;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #374151;
}

.empty-state p {
  margin-bottom: 24px;
}

.search-box {
  position: relative;
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: white;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 24px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

/* Dashboard específico */
.dashboard {
  max-width: 1400px;
  margin: 0 auto;
}

.dashboard-header {
  margin-bottom: 32px;
}

.dashboard-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.dashboard-header p {
  font-size: 16px;
  color: #6b7280;
}

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

.stat-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}

.trend-up {
  color: #059669;
  background: #dcfce7;
}

.trend-down {
  color: #dc2626;
  background: #fee2e2;
}

.stat-content {
  text-align: left;
}

.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.chart-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  border: 1px solid #e5e7eb;
}

.chart-header {
  margin-bottom: 20px;
}

.chart-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.chart-header p {
  font-size: 14px;
  color: #6b7280;
}

.chart-container {
  position: relative;
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-value {
  margin-left: auto;
  font-weight: 600;
  color: #374151;
}

.quick-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.summary-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  border: 1px solid #e5e7eb;
}

.summary-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 16px;
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-label {
  font-size: 14px;
  color: #6b7280;
}

.summary-value {
  font-size: 14px;
  font-weight: 600;
}

.summary-value.positive {
  color: #059669;
}

.summary-value.negative {
  color: #dc2626;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 1024px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
  
  .quick-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-header h1 {
    font-size: 24px;
  }
  
  .chart-card,
  .summary-card {
    padding: 16px;
  }
}

/* Páginas específicas */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  gap: 20px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.page-header p {
  font-size: 14px;
  color: #6b7280;
}

/* Produtos */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.product-card {
  background: white;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.product-image {
  width: 100%;
  height: 200px;
  position: relative;
  background: #f3f4f6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.no-image-text {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  max-width: 80%;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 20px;
}

.product-info h3 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.product-brand {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 4px;
}

.product-id {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
  margin-bottom: 8px;
}

.product-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-secondary {
  background: #f1f5f9;
  color: #475569;
}

.product-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: #f3f4f6;
  color: #374151;
}

.btn-icon.btn-danger:hover {
  background: #fee2e2;
  color: #dc2626;
}

.product-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 20px 20px 20px;
}

.product-prices {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.price-item {
  align-items: center;
}

.client-date {
  font-size: 12px;
  color: #6b7280;
}

.client-id {
  font-size: 11px;
  color: #3b82f6;
  font-weight: 600;
  background: #eff6ff;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.price-value {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.product-stats {
  display: flex;
  justify-content: space-between;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 2px;
}

.stat-value {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.product-supplier {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.supplier-label {
  color: #6b7280;
}

.supplier-name {
  color: #374151;
  font-weight: 500;
}

/* Modal de variações */
.modal-lg {
  max-width: 800px;
}

.variacao-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.add-variacao-form {
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.add-variacao-form h3 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.form-description {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
  line-height: 1.5;
}

.form-help {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
  display: block;
}

/* Sistema de Fotos com Variações */
.fotos-variacoes-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid #e5e7eb;
}

.fotos-variacoes-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.add-foto-variacao-form {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  margin-bottom: 20px;
}

.add-foto-variacao-form h4 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 16px;
}

.selected-files {
  margin-top: 8px;
  padding: 12px;
  background: #f0f9ff;
  border-radius: 6px;
  border: 1px solid #bae6fd;
}

.selected-files ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.selected-files li {
  font-size: 12px;
  color: #0369a1;
  margin-bottom: 2px;
}

.variacoes-adicionadas {
  margin-top: 20px;
}

.variacoes-adicionadas h4 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}

.variacoes-list-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.variacao-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.variacao-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.variacao-info strong {
  color: #111827;
  font-size: 14px;
}

.variacao-info span {
  font-size: 12px;
  color: #6b7280;
}

/* Seção de formulário */
.form-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.form-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}

/* =====================================================
   CONFIGURAÇÕES
   ===================================================== */

.configuracoes {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.config-section {
  background-color: #ffffff;
  background-image: none;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  margin-bottom: 24px;
  overflow: hidden;
}

.config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background-color: #ffffff;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.config-header:hover {
  background-color: #f8fafc;
  border-radius: 0;
  padding: 24px;
  margin: 0;
  box-shadow: inset 0 -1px 0 rgba(226, 232, 240, 0.8);
}

.config-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.expand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #64748b;
  transition: all 0.2s ease;
}

.expand-icon:hover {
  color: #1e293b;
  transform: scale(1.1);
}

.config-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.config-icon {
  width: 24px;
  height: 24px;
  color: #6366f1;
}

.config-title h2 {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.config-title p {
  font-size: 14px;
  color: #6b7280;
  margin: 4px 0 0 0;
}

.config-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #10b981;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.config-form {
  padding: 24px;
  background-color: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.config-info-text {
  font-size: 14px;
  color: #475569;
  margin-bottom: 16px;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.input-with-icon {
  position: relative;
}

.input-icon-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
}

.input-icon-btn:hover {
  color: #374151;
}

.config-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
}

.connection-status.success {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #d1fae5;
}

.connection-status.error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.status-icon {
  width: 16px;
  height: 16px;
}

.config-placeholder {
  padding: 40px 24px;
  text-align: center;
  color: #6b7280;
  font-style: italic;
}

/* Loading state for buttons */
.btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn.loading:hover {
  transform: none;
}

/* Responsive */
@media (max-width: 768px) {
  .config-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .config-toggle {
    align-self: flex-end;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .config-actions {
    flex-direction: column;
  }
}

/* =====================================================
   VIEW TOGGLE (CARDS/LIST)
   ===================================================== */

.view-toggle {
  display: flex;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 4px;
  gap: 2px;
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  color: #6b7280;
}

.view-toggle-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

.view-toggle-btn.active {
  background: white;
  color: #6366f1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.view-toggle-btn svg {
  width: 16px;
  height: 16px;
}

/* =====================================================
   LIST VIEW STYLES
   ===================================================== */

.list-view {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.list-header {
  display: grid;
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  color: #374151;
  font-size: 14px;
}

.list-item {
  display: grid;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
  cursor: pointer;
}

.list-item:hover {
  background: #f8fafc;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Produtos List View */
.produtos-list-header {
  grid-template-columns: 60px 1fr 120px 120px 100px 80px 120px;
  gap: 16px;
}

.produtos-list-item {
  grid-template-columns: 60px 1fr 120px 120px 100px 80px 120px;
  gap: 16px;
  align-items: center;
}

.list-item-image {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.list-item-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.list-item-badge.verao { background: #fef3c7; color: #d97706; }
.list-item-badge.inverno { background: #dbeafe; color: #2563eb; }
.list-item-badge.meia-estacao { background: #f3e8ff; color: #7c3aed; }

.list-item-badge.menino { background: #dbeafe; color: #2563eb; }
.list-item-badge.menina { background: #fce7f3; color: #ec4899; }
.list-item-badge.unissex { background: #f3f4f6; color: #6b7280; }

/* Clientes List View */
.clientes-list-header {
  grid-template-columns: 2fr 1.5fr 1fr 2fr 120px;
  gap: 16px;
  padding: 12px 16px;
}

.clientes-list-item {
  grid-template-columns: 2fr 1.5fr 1fr 2fr 120px;
  gap: 16px;
  align-items: center;
  padding: 16px;
  min-height: 70px;
}

.clientes-list-item > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.clientes-list-item > span {
  display: flex;
  align-items: center;
  word-break: break-word;
  overflow: hidden;
}

.clientes-list-item > span[title] {
  cursor: help;
}

/* Fornecedores List View */
.fornecedores-list-header {
  grid-template-columns: 1fr 200px 150px 150px 120px;
  gap: 16px;
}

.fornecedores-list-item {
  grid-template-columns: 1fr 200px 150px 150px 120px;
  gap: 16px;
  align-items: center;
}

/* Despesas List View */
.despesas-list-header {
  grid-template-columns: 120px 150px 1fr 120px 150px 120px;
  gap: 16px;
}

.despesas-list-item {
  grid-template-columns: 120px 150px 1fr 120px 150px 120px;
  gap: 16px;
  align-items: center;
}

/* Vendas List View */
.vendas-list-header {
  grid-template-columns: 120px 1fr 150px 120px 100px 120px 120px;
  gap: 16px;
}

.vendas-list-item {
  grid-template-columns: 120px 1fr 150px 120px 100px 120px 120px;
  gap: 16px;
  align-items: center;
}

/* Responsive para list view */
@media (max-width: 1024px) {
  .produtos-list-header,
  .produtos-list-item {
    grid-template-columns: 1fr 100px 80px 100px;
    gap: 12px;
  }
  
  .clientes-list-header,
  .clientes-list-item {
    grid-template-columns: 1fr 120px 80px;
    gap: 8px;
    padding: 12px 8px;
  }
  
  .fornecedores-list-header,
  .fornecedores-list-item {
    grid-template-columns: 1fr 150px 100px;
    gap: 12px;
  }
  
  .despesas-list-header,
  .despesas-list-item {
    grid-template-columns: 100px 1fr 100px 100px;
    gap: 12px;
  }
  
  .vendas-list-header,
  .vendas-list-item {
    grid-template-columns: 100px 1fr 100px 100px;
    gap: 12px;
  }
}

/* =====================================================
   VENDAS A PRAZO - DASHBOARD
   ===================================================== */

.vendas-prazo-card {
  min-height: 400px;
}

.vendas-prazo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.vendas-prazo-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #374151;
  font-size: 16px;
  font-weight: 600;
}

.vendas-prazo-content {
  flex: 1;
}

.loading-vendas,
.empty-vendas {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #6b7280;
  text-align: center;
}

.empty-vendas svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.vendas-prazo-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.venda-prazo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid #e5e7eb;
  background: #f9fafb;
  transition: all 0.2s;
}

.venda-prazo-item:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

.venda-prazo-item.vencido {
  border-left-color: #ef4444;
  background: #fef2f2;
}

.venda-prazo-item.hoje {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.venda-prazo-item.amanha {
  border-left-color: #eab308;
  background: #fefce8;
}

.venda-prazo-item.proximo {
  border-left-color: #3b82f6;
  background: #eff6ff;
}

.venda-prazo-item.futuro {
  border-left-color: #10b981;
  background: #ecfdf5;
}

.venda-info {
  flex: 1;
}

.cliente-nome {
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.venda-detalhes {
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: #6b7280;
}

.venda-detalhes .valor {
  font-weight: 500;
  color: #059669;
}

.venda-detalhes .parcela {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.venda-vencimento {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vencimento-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.vencimento-badge.vencido {
  background: #fecaca;
  color: #991b1b;
}

.vencimento-badge.hoje {
  background: #fed7aa;
  color: #c2410c;
}

.vencimento-badge.amanha {
  background: #fef3c7;
  color: #d97706;
}

.vencimento-badge.proximo {
  background: #dbeafe;
  color: #2563eb;
}

.vencimento-badge.futuro {
  background: #d1fae5;
  color: #065f46;
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #25d366;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-whatsapp:hover {
  background: #128c7e;
  transform: scale(1.1);
}

.btn-whatsapp svg {
  width: 16px;
  height: 16px;
}

.ver-mais {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  margin-top: 16px;
}

.btn-link {
  background: none;
  border: none;
  color: #6366f1;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
}

.btn-link:hover {
  color: #4f46e5;
}

/* Responsive para vendas a prazo */
@media (max-width: 768px) {
  .vendas-prazo-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .venda-prazo-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .venda-vencimento {
    align-self: flex-end;
  }
}

.variacoes-list h3 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 16px;
}

.empty-variacoes {
  text-align: center;
  padding: 40px;
  color: #6b7280;
}

.variacoes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.variacao-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.variacao-card:hover {
  box-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.1);
}

.variacao-image {
  width: 100%;
  height: 120px;
  position: relative;
  background: #f3f4f6;
}

.variacao-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 24px;
}

.variacao-info {
  padding: 12px;
}

.variacao-details {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.variacao-size {
  font-weight: 600;
  color: #111827;
}

.variacao-color {
  color: #6b7280;
  font-size: 14px;
}

.variacao-stock {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stock-label {
  font-size: 12px;
  color: #6b7280;
}

.stock-value {
  font-size: 14px;
  font-weight: 600;
  color: #059669;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .product-prices {
    flex-direction: column;
    gap: 8px;
  }
  
  .price-item {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .modal-lg {
    max-width: 95vw;
  }
  
  .variacoes-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

/* Clientes e Fornecedores */
.clients-grid,
.suppliers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.client-card,
.supplier-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.client-card:hover,
.supplier-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.client-header,
.supplier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.client-avatar,
.supplier-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.client-actions,
.supplier-actions {
  display: flex;
  gap: 8px;
}

.client-name,
.supplier-name {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}

.client-detail,
.supplier-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #6b7280;
}

.detail-icon {
  font-size: 16px;
  color: #9ca3af;
}

.client-meta,
.supplier-meta {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

.client-date,
.supplier-date {
  font-size: 12px;
  color: #9ca3af;
}

/* Despesas */
.expenses-summary,
.sales-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.expenses-table,
.sales-table {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.expense-date,
.sale-date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.date-icon {
  color: #6b7280;
}

.expense-description {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-value,
.sale-value {
  font-weight: 600;
  color: #059669;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.modal-sm {
  max-width: 400px;
}

.existing-types {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.existing-types h4 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
}

.types-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

/* Vendas */
.sale-client {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.client-icon {
  color: #6b7280;
}

.payment-info {
  display: flex;
  align-items: center;
}

.sale-form-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.sale-form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.sale-form-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 16px;
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sale-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.item-name {
  font-weight: 600;
  color: #111827;
}

.item-variation {
  font-size: 14px;
  color: #6b7280;
}

.item-quantity,
.item-price {
  font-size: 12px;
  color: #9ca3af;
}

.sale-totals {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.total-final {
  font-weight: 700;
  background: #dcfce7 !important;
  color: #166534 !important;
}

@media (max-width: 768px) {
  .clients-grid,
  .suppliers-grid {
    grid-template-columns: 1fr;
  }
  
  .expenses-summary,
  .sales-summary {
    grid-template-columns: 1fr;
  }
  
  .header-actions {
    flex-direction: column;
  }
  
  .sale-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .item-info {
    width: 100%;
  }
}

/* =====================================================
   ESTILOS DA PÁGINA DE CONFIGURAÇÕES
   ===================================================== */

.config-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.status-loading {
  color: #6b7280;
}

.status-success {
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-error {
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-section {
  padding: 32px 24px;
  text-align: center;
}

.auth-info {
  margin-bottom: 24px;
}

.auth-info h3 {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 12px 0;
}

.auth-info p {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
}

.auth-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  display: inline-block;
}

.auth-info li {
  font-size: 14px;
  color: #374151;
  margin-bottom: 8px;
  padding-left: 4px;
}

.export-section {
  padding: 24px;
}

.export-options {
  margin: 24px 0;
}

.export-options h3 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 16px 0;
}

.export-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.export-info {
  margin-top: 32px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.export-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 16px 0;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.info-item {
  background: white;
  padding: 16px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.info-item strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.info-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-item li {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
  padding-left: 12px;
  position: relative;
}

.info-item li:before {
  content: "•";
  color: #6366f1;
  position: absolute;
  left: 0;
}

/* Responsivo para seções de exportação */
@media (max-width: 768px) {
  .export-buttons {
    flex-direction: column;
  }
  
  .export-buttons .btn {
    width: 100%;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .auth-info ul {
    text-align: center;
  }
}

/* Seção de Credenciais */
.credentials-section {
  padding: 24px;
}

.setup-steps {
  margin-top: 16px;
  padding: 16px;
  background: #f0f9ff;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
}

.setup-steps small {
  line-height: 1.6;
  color: #374151;
}

.setup-steps a {
  color: #3b82f6;
  text-decoration: none;
}

.setup-steps a:hover {
  text-decoration: underline;
}

.setup-steps code {
  background: #e5e7eb;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
}

.config-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Status melhorado */
.status-error {
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

/* Responsivo para credenciais */
@media (max-width: 768px) {
  .credentials-section {
    padding: 16px;
  }
  
  .config-actions {
    flex-direction: column;
  }
  
  .config-actions .btn {
    width: 100%;
  }
  
  .setup-steps {
    padding: 12px;
  }
}

/* Estilos para cálculo de margem de lucro */
.description-input-group {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.form-textarea {
  flex: 1;
  min-height: 80px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.form-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ai-description-btn {
  white-space: nowrap;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  height: fit-content;
  margin-top: 2px;
}

.ai-description-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ai-description-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.valor-revenda-calculado {
  background-color: #f8fafc;
  border-color: #3b82f6;
}

.lucro-info {
  color: #059669;
  font-weight: 500;
  font-size: 12px;
}

/* Estilos para configuração ChatGPT */
.chatgpt-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.chatgpt-section h3 {
  color: white;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.chatgpt-section .form-label {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.chatgpt-section .form-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.chatgpt-section .form-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.chatgpt-section .form-input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.chatgpt-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 8px;
}

.chatgpt-status.configured {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.chatgpt-status.not-configured {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Estilos para imagem clicável */
.clickable-image {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  overflow: hidden;
  background: #f3f4f6;
}

.clickable-image:hover {
  transform: scale(1.1);
  color: #3b82f6;
}

.product-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.image-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 50%;
  padding: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.clickable-image:hover .image-overlay {
  opacity: 1;
}

/* Modal de visualização de imagens */
.image-modal {
  background: white;
  border-radius: 12px;
  max-width: 95vw;
  max-height: 95vh;
  width: 900px;
  height: 700px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.image-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.image-modal-info h3 {
  margin: 0 0 8px 0;
  color: #1f2937;
  font-size: 18px;
  font-weight: 600;
}

.image-modal-info p {
  margin: 0 0 8px 0;
  color: #6b7280;
  font-size: 14px;
}

.image-counter {
  background: #3b82f6;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.image-modal-content {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.image-container {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  min-height: 0;
  overflow: hidden;
}

.modal-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.image-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.image-nav:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.image-nav.prev {
  left: 20px;
}

.image-nav.next {
  right: 20px;
}

.image-details {
  width: 280px;
  padding: 20px;
  background: #f9fafb;
  border-left: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.image-details h4 {
  margin: 0 0 12px 0;
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
}

.image-details p {
  margin: 0 0 8px 0;
  color: #4b5563;
  font-size: 14px;
}

.image-thumbnails {
  display: flex;
  gap: 12px;
  padding: 20px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  overflow-x: auto;
}

.thumbnail {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.thumbnail:hover {
  border-color: #3b82f6;
  transform: scale(1.05);
}

.thumbnail.active {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 10px;
  padding: 2px 4px;
  text-align: center;
}

/* Operações agrupadas nas vendas */
.operacoes-badge {
  margin-top: 4px;
}

.operacoes-badge .badge {
  font-size: 10px;
  padding: 2px 6px;
}

.agrupamento-info {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 16px;
}

.agrupamento-info .info-text {
  margin: 0;
  color: #1565c0;
  font-size: 14px;
}

.operacoes-agrupadas-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.operacao-agrupada-item {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 16px;
  border-left: 4px solid #007bff;
}

.operacao-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9ecef;
}

.operacao-tipo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.operacao-id {
  font-size: 12px;
  color: #6c757d;
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 4px;
}

.operacao-data {
  font-size: 12px;
  color: #6c757d;
}

.operacao-detalhes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.operacao-detalhes > div {
  font-size: 14px;
}

.itens-operacao h5 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #495057;
}

.itens-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-operacao {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 8px;
}

.item-nome {
  font-weight: 500;
  margin-bottom: 4px;
}

.item-detalhes {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #6c757d;
}

.item-detalhes span {
  background: #f8f9fa;
  padding: 2px 6px;
  border-radius: 3px;
}

/* Seções de configuração de alertas */
.alert-config-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.alert-config-section h4 {
  margin: 0 0 16px 0;
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-help-section {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 16px;
  margin-top: 20px;
}

.form-help-section .form-help {
  margin: 0;
  color: #0369a1;
}

.form-help-section code {
  background: #dbeafe;
  color: #1e40af;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .description-input-group {
    flex-direction: column;
  }

  .ai-description-btn {
    align-self: flex-start;
    margin-top: 8px;
  }

  .image-modal {
    width: 95vw;
    height: 95vh;
  }

  .image-nav {
    width: 40px;
    height: 40px;
  }

  .image-nav.prev {
    left: 10px;
  }

  .image-nav.next {
    right: 10px;
  }

  .image-thumbnails {
    padding: 15px;
  }

  .thumbnail {
    width: 60px;
    height: 60px;
  }
}
