/* General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

:root {
  --primary-color: #7c3aed;
  --primary-hover: #6d28d9;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --background-color: #f8fafc;
  --card-background: rgba(255, 255, 255, 0.9);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background-color: var(--background-color);
  background-image: radial-gradient(
      circle at 100% 100%,
      rgba(124, 58, 237, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 0% 0%,
      rgba(16, 185, 129, 0.1) 0%,
      transparent 50%
    );
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../img/pattern.svg");
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}

h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 2rem;
}

footer {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 2rem;
}

.hidden {
  display: none !important;
}

/* Auth Section */
.auth-container {
  max-width: 420px;
  margin: 2rem auto;
  background: var(--card-background);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: slideUp 0.5s ease-out;
}

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

.auth-tabs {
  display: flex;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  gap: 1rem;
  position: relative;
}

.tab-btn {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  position: relative;
}

.tab-btn.active {
  color: var(--primary-color);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  animation: slideIn 0.3s ease-out;
}

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

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.auth-form h2 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
}

.auth-form input:focus {
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
}

.auth-form button[type="submit"] {
  width: 100%;
  padding: 0.75rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.auth-form button[type="submit"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.auth-form button[type="submit"]:hover::before {
  left: 100%;
}

.auth-form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Main Section */
.main-nav {
  background: var(--card-background);
  padding: 1rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: 1rem;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: 0.3s;
  z-index: -1;
}

.nav-btn:hover {
  color: white;
}

.nav-btn:hover::before {
  opacity: 1;
}

.nav-btn.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.content-section {
  display: none;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.5s ease-out;
}

/* Products Section */
.search-container {
  text-align: center;
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-container input {
  padding: 0.75rem 1rem;
  width: 300px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
}

.search-container input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: white;
  transform: translateY(-2px);
}

.search-container button {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.search-container button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.search-container button:hover::before {
  left: 100%;
}

.search-container button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.pallet {
  background: var(--card-background);
  padding: 1.5rem;
  margin: 1rem 0;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pallet:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pallet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  gap: 1rem;
}

.pallet-header:hover {
  background: rgba(124, 58, 237, 0.1);
}

/* Container para agrupar os botões do pallet */
.pallet-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.pallet-buttons button {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.pallet-buttons button:first-child {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.pallet-buttons button:first-child:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
}

.pallet-buttons button:last-child {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.pallet-buttons button:last-child:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

.produto-list {
  display: none;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1rem 0;
}

.produto-list.aberto {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

.produto {
  background: var(--card-background);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  width: calc(33.333% - 1rem);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.produto::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: 0.3s;
}

.produto:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.produto:hover::before {
  opacity: 1;
}

.produto h3 {
  margin-top: 0;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.produto p {
  margin: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.produto .preco {
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.25rem;
}

.produto button {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  width: 100%;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.produto button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.produto button:hover::before {
  left: 100%;
}

.produto button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Container de produtos com scroll */
#produtoContainer {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 10px;
  margin-top: 1rem;
  scroll-behavior: smooth;
}

/* Scrollbar personalizada para o container de produtos */
#produtoContainer::-webkit-scrollbar {
  width: 8px;
}

#produtoContainer::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

#produtoContainer::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  border-radius: 4px;
  transition: background 0.3s ease;
}

#produtoContainer::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
}

/* Botão flutuante para voltar ao topo */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

/* Spreadsheets Section */
.upload-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-container h2 {
  color: white;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 600;
}

.upload-container form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upload-container input[type="text"] {
  padding: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.upload-container input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.upload-container input[type="text"]:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.upload-container input[type="file"] {
  padding: 1rem;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-container input[type="file"]:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

.upload-container button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 1rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.upload-container button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.spreadsheet-item {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.spreadsheet-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.spreadsheet-item h3 {
  color: white;
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.spreadsheet-item p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
}

.spreadsheet-item button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.spreadsheet-item button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

/* Help Section */
.help-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 2rem;
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.help-section h2 {
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 600;
}

.help-section ul {
  list-style: none;
  padding: 0;
}

.help-section li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  padding-left: 1.5rem;
}

.help-section li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}

.help-image {
  max-width: 100%;
  border-radius: 10px;
  margin-top: 1rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Loader */
.loader {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 3px solid rgba(124, 58, 237, 0.3);
  border-radius: 50%;
  border-top-color: #7c3aed;
  animation: spin 1s ease-in-out infinite;
  margin: 2rem auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Success/Error states for inputs */
input.success {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .produto {
    width: calc(50% - 1rem);
  }
}

@media (max-width: 768px) {
  .content-section {
    padding: 1.5rem;
  }

  /* Ajuste do container de produtos em mobile */
  #produtoContainer {
    max-height: 60vh;
    padding-right: 5px;
  }

  /* Ajuste do botão de scroll em mobile */
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 16px;
  }

  /* Ajuste do discount-config em mobile */
  #discount-config {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  #discount-config input {
    width: 100% !important;
    max-width: none !important;
  }

  #discount-config button {
    width: 100%;
    margin-top: 5px;
  }

  .search-container {
    padding: 1rem;
    margin: 1rem;
  }

  .search-container input,
  .search-container button {
    padding: 0.75rem;
  }

  .upload-container,
  .help-section {
    padding: 1.5rem;
    margin: 1rem;
  }

  .spreadsheet-item {
    padding: 1rem;
    margin: 0.5rem 0;
  }

  .upload-container form {
    gap: 0.75rem;
  }

  .upload-container input[type="text"],
  .upload-container input[type="file"],
  .upload-container button {
    padding: 0.75rem;
  }

  .swal2-popup {
    margin: 1rem !important;
    width: calc(100% - 2rem) !important;
  }
}

@media (max-width: 480px) {
  .produto {
    width: 100%;
  }

  .main-nav {
    flex-wrap: wrap;
  }

  .nav-btn {
    width: calc(50% - 0.5rem);
    text-align: center;
  }

  .spreadsheet-item {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .spreadsheet-item button {
    width: 100%;
  }
}

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

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

.content-section.active {
  animation: fadeIn 0.5s ease-out;
}

.produto-list.aberto {
  animation: fadeIn 0.3s ease-out;
}

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

::-webkit-scrollbar-track {
  background: var(--background-color);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}

/* Floating Animation */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.pallet:hover .pallet-header {
  animation: float 2s ease-in-out infinite;
}

/* Custom SweetAlert2 styles */
.swal2-popup {
  border-radius: 15px !important;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
}

.swal2-title {
  color: #1f2937 !important;
  font-weight: 600 !important;
}

.swal2-html-container {
  color: #4b5563 !important;
}

.swal2-confirm {
  border-radius: 8px !important;
  font-weight: 500 !important;
  padding: 12px 24px !important;
}

.swal2-cancel {
  border-radius: 8px !important;
  font-weight: 500 !important;
  padding: 12px 24px !important;
}

/* Toast notifications */
.swal2-toast {
  border-radius: 10px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Loading animation */
.swal2-loading {
  border-color: #7c3aed !important;
}

/* No data message */
.no-data {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 2rem;
  background: rgba(124, 58, 237, 0.05);
  border-radius: 10px;
  border: 2px dashed #7c3aed;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .swal2-popup {
    border: 2px solid #000 !important;
  }

  .upload-container,
  .help-section,
  .spreadsheet-item,
  .search-container {
    border: 2px solid #000;
  }
}

/* Password container and eye button */
.password-container {
  position: relative;
  margin-bottom: 1rem;
}

.password-container input {
  width: 100%;
  padding-right: 3rem; /* Make space for icon */
  margin-bottom: 0; /* Remove margin from this input */
}

.eye-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  z-index: 2;
}

.eye-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.eye-btn svg {
  width: 1rem;
  height: 1rem;
  fill: #94a3b8;
  transition: fill 0.2s ease-in-out;
}

.eye-btn:hover svg {
  fill: var(--primary-color);
}

/* Password validation styles */
.password-container.error input {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

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

.password-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.password-error.show {
  display: block;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.loading {
  text-align: center;
  padding: 2rem;
  font-size: 1.1rem;
  color: var(--primary-color);
  background: var(--card-background);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  animation: pulse 1.5s ease-in-out infinite;
}

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

.no-data {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-style: italic;
  background: var(--card-background);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

/* Bling Section - Modern Design */
/* Animated Gradient Background */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.bling-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px;
  background: linear-gradient(135deg, #6b73ff 0%, #9a60ff 50%, #ff6ea0 100%);
  background-size: 400% 400%;
  animation: gradientShift 18s ease-in-out infinite;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  color: white;
  min-height: 100vh;
  background-color: #f0f8ff;
}

/* Larger, Centered Headings */
.bling-container h2 {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  background: linear-gradient(45deg, #fff, #f0f8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Main Content Card */
.bling-main-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Status Card */
#auth-status {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 25px;
  margin: 25px 345px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  text-align: center;
}

#auth-status:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.status-connected {
  color: #4ade80;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  justify-content: center;
}

.status-connected::before {
  content: "✓";
  background: #4ade80;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.status-disconnected {
  color: #f87171;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  justify-content: center;
}

.status-disconnected::before {
  content: "✗";
  background: #f87171;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

#auth-status small {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* View Tokens Button */
#view-tokens-btn {
  background: linear-gradient(135deg, #21c8f1 3%, #2261aae7 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 15px 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

#test-search-btn {
  background: linear-gradient(135deg, #f1af21 3%, #f0610ee7 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 15px 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

#view-tokens-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

#view-tokens-btn:hover::before {
  left: 100%;
}

#view-tokens-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Authorization Form Card */
#bling-auth-form {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  backdrop-filter: blur(10px);
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 35px;
  margin: 25px 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

#bling-auth-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7c3aed, #4ade80, #22c55e);
  border-radius: 16px 16px 0 0;
}

#bling-auth-form h3 {
  color: #1e293b;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
  text-shadow: none;
  position: relative;
}

#bling-auth-form h3::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #7c3aed, #4ade80);
  border-radius: 2px;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

/* Bigger form labels and inputs */
.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #374151;
  font-size: 1.1rem;
  text-shadow: none;
}

.form-group input {
  width: 100%;
  padding: 16px 18px;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  color: #1e293b;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  backdrop-filter: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-group input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.form-group input:focus {
  outline: none;
  border-color: #7c3aed;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
  transform: translateY(-1px);
}

.form-group input[type="password"] {
  padding-right: 50px;
}

/* Eye Button for Password */
.eye-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.eye-btn:hover {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
}

/* Submit Button */
#bling-auth-form button[type="submit"] {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

#bling-auth-form button[type="submit"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

#bling-auth-form button[type="submit"]:hover::before {
  left: 100%;
}

#bling-auth-form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
  background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
}

/* Products Section Card */
.bling-products-section {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 30px;
  margin-top: 25px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.bling-products-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.bling-products-section h3 {
  color: white;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.bling-products-section h3::before {
  content: "🛍️";
  font-size: 2rem;
}

.bling-products-section h3::after {
  content: "Bling";
  background: linear-gradient(45deg, #4ade80, #22c55e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

/* Products Grid with Scroll */
.bling-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 20px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  margin: 0 -10px; /* Compensate for padding */
}

.bling-products-grid::-webkit-scrollbar {
  width: 8px;
}

.bling-products-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin: 10px 0;
}

.bling-products-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.bling-products-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Empty State */
.bling-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.8);
}

.bling-empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.6;
}

.bling-empty-state h4 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: white;
}

.bling-empty-state p {
  font-size: 1rem;
  line-height: 1.5;
}

/* Token Modal Styles */
.token-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 25px;
  margin: 20px 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.token-container h3 {
  color: #1f2937;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.token-container .input-group {
  display: flex;
  align-items: center;
  margin: 15px 0;
  gap: 12px;
  background: #f8fafc;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.token-container input {
  flex: 1;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  background: white;
  font-size: 0.9rem;
  color: #374151;
  transition: all 0.3s ease;
}

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

.token-container button {
  padding: 10px 15px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  cursor: pointer;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 80px;
}

.token-container button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.token-container label {
  display: block;
  margin-bottom: 6px;
  color: #4b5563;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Product Cards Enhancement */
.bling-product {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.bling-product::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.6s;
}

.bling-product:hover::before {
  left: 100%;
}

.bling-product:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.bling-product img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.bling-product:hover img {
  transform: scale(1.05);
}

/* Bigger product fonts */
.bling-product h4 {
  margin: 15px 0 10px 0;
  color: #1f2937;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
}

.bling-product p {
  margin: 8px 0;
  color: #6b7280;
  font-size: 1.05rem;
  line-height: 1.4;
}

.bling-product .price {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  display: inline-block;
  font-weight: 700;
  margin-top: 15px;
}

/* Loading and Results */
#bling-results {
  margin-top: 30px;
}

.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin: 20px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Loading States and Animations */
.status-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.status-loading .loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

/* Token Modal Enhancements */
.token-modal-popup {
  border-radius: 20px !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25) !important;
}

.token-modal-popup .swal2-title {
  color: #1f2937 !important;
  font-weight: 700 !important;
}

/* Enhanced Button States */
#bling-auth-form button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

#bling-auth-form button[type="submit"] .loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

/* Form Input Enhancements */
.form-group input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* Status Animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.status-connected {
  animation: pulse 2s infinite;
}

/* Container Entrance Animation */
.bling-container {
  animation: slideInUp 0.6s ease-out;
}

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

/* Responsive Enhancements */
@media (max-width: 768px) {
  .bling-container {
    padding: 20px;
    margin: 10px;
    border-radius: 15px;
  }

  .bling-container h2 {
    font-size: 2rem;
  }

  .bling-products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-height: 500px;
  }

  .token-container .input-group {
    flex-direction: column;
    align-items: stretch;
  }

  .token-container button {
    width: 100%;
    margin-top: 10px;
  }

  .form-group input {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .bling-container h2 {
    font-size: 1.8rem;
  }

  .bling-products-section h3 {
    font-size: 1.5rem;
  }

  /* Formulário de integração responsivo */
  #bling-auth-form {
    padding: 25px 20px;
    margin: 20px 0;
    border-radius: 12px;
  }

  #bling-auth-form h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
  }

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

  .form-group label {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .form-group input {
    padding: 14px 16px;
    font-size: 16px;
  }

  #bling-auth-form button[type="submit"] {
    padding: 14px 25px;
    font-size: 1rem;
  }

  .eye-btn {
    padding: 6px;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  #bling-auth-form {
    padding: 20px 15px;
    margin: 15px 0;
  }

  #bling-auth-form h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
  }

  .form-group input {
    padding: 12px 14px;
  }

  #bling-auth-form button[type="submit"] {
    padding: 12px 20px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .token-container {
    background: rgba(30, 41, 59, 0.95);
    color: #f1f5f9;
  }

  .token-container input {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #475569;
  }

  .token-container .input-group {
    background: #334155;
    border-color: #475569;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .bling-container,
  .bling-product,
  #view-tokens-btn,
  .form-group input,
  .token-container button {
    animation: none !important;
    transition: none !important;
  }

  .bling-product:hover {
    transform: none !important;
  }

  #view-tokens-btn:hover {
    transform: none !important;
  }
}

/* Focus indicators for accessibility */
.form-group input:focus,
.token-container button:focus,
#view-tokens-btn:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bling-container {
    border: 2px solid white;
  }

  .form-group input {
    border-width: 2px;
  }

  .token-container {
    border: 2px solid #1f2937;
  }
}

/* Make sure content sections are properly hidden/shown */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

/* Center the products grid and adjust card width for better centering */
.bling-products-grid {
  justify-content: center;
  align-content: flex-start;
  justify-items: center;
}

.bling-product {
  width: 100%;
  max-width: 420px;
  text-align: left;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Larger status font */
.status-connected span,
.status-disconnected span {
  font-size: 1.2rem;
}

/* Increase font sizes further inside product cards */
.bling-product h4 {
  font-size: 1.6rem;
}

.bling-product p {
  font-size: 1.15rem;
}

.bling-product .price {
  font-size: 1.3rem;
}

/* --- Suavização dos cards dos produtos do Bling --- */
.bling-product {
  background: #fffbe9 !important; /* bege claro */
  color: #1e293b !important; /* texto escuro para contraste */
  box-shadow: 0 6px 24px rgba(162, 89, 255, 0.08);
  border: 1px solid #f3e9ff;
}

.bling-product h4,
.bling-product p {
  color: #1e293b !important;
}

.bling-product .price {
  background: #10b981;
  color: #fff;
}

/* --- Suavização da área de integração com o Bling --- */
.bling-container {
  background: #fffbe9 !important; /* bege claro */
  color: #1e293b !important;
  box-shadow: 0 8px 32px rgba(162, 89, 255, 0.06);
  border-radius: 20px;
  padding: 30px;
  min-height: 100vh;
  backdrop-filter: none !important;
}

.bling-main-card,
.bling-products-section,
#bling-auth-form,
#auth-status {
  background: #fff !important;
  color: #1e293b !important;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(162, 89, 255, 0.05);
  border: 1px solid #f3e9ff;
  backdrop-filter: none !important;
}

.bling-container h2,
.bling-products-section h3 {
  color: #a259ff !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
  text-shadow: none !important;
}

/* --- Ajuste dos botões de olho e copiar no modal de tokens --- */
.token-container .input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.token-container .input-group input {
  flex: 1;
  min-width: 0;
}

.token-container .eye-btn {
  position: static;
  right: auto;
  top: auto;
  transform: none;
  background: none;
  border: none;
  padding: 0.5rem;
  margin-left: 0;
  margin-right: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.token-container .eye-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.token-container .input-group button[onclick*="copyToken"] {
  background: #f3e9ff;
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  margin-right: 0;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.token-container .input-group button[onclick*="copyToken"]:hover {
  background: #e0d7ff;
}

.img-step {
  width: 900px;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #ccc;
  padding: 10px;
  margin: 10px;
  background-color: #f0f0f0;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
}

.upload-area a:hover {
  background-color: #3b82f6;
}

/* Estilos para produtos Bling */
.bling-products-section {
  padding: 30px;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  color: #f3f4f6;
  animation: slideInUp 0.8s ease;
}

#bling-results {
  margin-top: 25px;
}

.bling-filter-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.bling-filter-container h3 {
  margin: 0;
  font-size: 1.4rem;
  color: white;
}

.bling-filter-container .filter-controls {
  display: flex;
  gap: 10px;
}

#bling-filter-input {
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #374151;
  background-color: #1f2937;
  color: white;
  font-size: 0.95rem;
  width: 250px;
  transition: all 0.3s ease;
}

#bling-filter-input:focus {
  outline: none;
  border-color: #6d28d9;
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.3);
}

.bling-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.bling-product {
  background-color: #1f2937;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bling-product:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.bling-product img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.bling-product h4 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  flex-grow: 1;
}

.bling-product p {
  margin: 2px 0;
  font-size: 0.9rem;
  color: #d1d5db;
}

.bling-product p strong {
  color: #9ca3af;
}

.bling-product button {
  margin-top: 15px;
  padding: 10px 15px;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.bling-product button:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
}

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #374151;
}

.pagination {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pagination button {
  padding: 10px 18px;
  background-color: #374151;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.pagination button:hover:not(:disabled) {
  background-color: #4b5563;
}

.pagination button:disabled {
  background-color: #1f2937;
  color: #6b7280;
  cursor: not-allowed;
}

.pagination .page-indicator {
  font-size: 1rem;
  font-weight: 500;
  color: #d1d5db;
  padding: 0 10px;
}

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

/* Responsividade */
@media (max-width: 768px) {
  .dashboard-container {
    padding: 10px;
    margin: 10px;
    border-radius: 15px;
  }

  .bling-container h2 {
    font-size: 2rem;
  }

  .bling-products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-height: 500px;
  }

  .token-container .input-group {
    flex-direction: column;
    align-items: stretch;
  }

  .token-container button {
    width: 100%;
    margin-top: 10px;
  }

  .form-group input {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .bling-container h2 {
    font-size: 1.8rem;
  }

  .bling-products-section h3 {
    font-size: 1.5rem;
  }

  /* Formulário de integração responsivo */
  #bling-auth-form {
    padding: 25px 20px;
    margin: 20px 0;
    border-radius: 12px;
  }

  #bling-auth-form h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
  }

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

  .form-group label {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .form-group input {
    padding: 14px 16px;
    font-size: 16px;
  }

  #bling-auth-form button[type="submit"] {
    padding: 14px 25px;
    font-size: 1rem;
  }

  .eye-btn {
    padding: 6px;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  #bling-auth-form {
    padding: 20px 15px;
    margin: 15px 0;
  }

  #bling-auth-form h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
  }

  .form-group input {
    padding: 12px 14px;
  }

  #bling-auth-form button[type="submit"] {
    padding: 12px 20px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
  }
}

/* Mercado Livre Search Styles */
.search-ml-btn {
  background: linear-gradient(135deg, #ffe100 0%, #ffcd00 100%);
  color: #333 !important;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(255, 205, 0, 0.3);
}

.search-ml-btn:hover {
  background: linear-gradient(135deg, #ffcd00 0%, #ffb700 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 205, 0, 0.4);
}

/* Modal do Mercado Livre */
.ml-modal-popup {
  border-radius: 15px !important;
}

.ml-search-header {
  text-align: center;
  margin-bottom: 20px;
  padding: 15px;
  background: linear-gradient(135deg, #ffe100 0%, #ffcd00 100%);
  border-radius: 10px;
  color: #333;
}

.ml-search-header strong {
  color: #1a1a1a;
}

.ml-produtos-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  max-height: 500px;
  overflow-y: auto;
  padding: 10px;
}

.ml-produto {
  display: flex;
  gap: 12px;
  padding: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ml-produto:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  border-color: #ffcd00;
}

.ml-produto img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.ml-produto-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ml-produto-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ml-preco {
  font-size: 16px;
  font-weight: 700;
  color: #059669;
  margin-bottom: 4px;
}

.ml-vendedor {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 2px;
}

.ml-vendas {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}

.ml-link {
  display: inline-block;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white !important;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
}

.ml-link:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
}

/* Responsive para o modal */
@media (max-width: 768px) {
  .ml-produtos-container {
    grid-template-columns: 1fr;
    max-height: 400px;
  }

  .ml-produto {
    flex-direction: column;
    text-align: center;
  }

  .ml-produto img {
    width: 60px;
    height: 60px;
    margin: 0 auto;
  }
}

/* Estilos para a seção do Mercado Livre */
#mercado-livre-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 2rem;
}

#mercado-livre-section h2 {
  color: white;
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.discount-container {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.discount-container input {
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.ml-header {
  text-align: center;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ml-header h3 {
  color: white;
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ml-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.ml-produto-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ml-produto-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.ml-produto-card .ml-produto {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.ml-produto-card .ml-produto img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  flex-shrink: 0;
}

.ml-produto-card .ml-produto-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ml-produto-card .ml-produto-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ml-produto-card .ml-preco {
  font-size: 1.2rem;
  font-weight: 700;
  color: #059669;
  margin: 0;
}

.ml-produto-card .ml-preco-desconto {
  font-size: 1.3rem;
  font-weight: 800;
  color: #dc2626;
  margin: 0;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  padding: 0.5rem;
  border-radius: 8px;
  border-left: 4px solid #dc2626;
}

.ml-produto-card .ml-link {
  display: inline-block;
  background: linear-gradient(135deg, #ffe100 0%, #ffcd00 100%);
  color: #333 !important;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(255, 205, 0, 0.3);
  margin-top: auto;
}

.ml-produto-card .ml-link:hover {
  background: linear-gradient(135deg, #ffcd00 0%, #ffb700 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 205, 0, 0.4);
}

/* Responsive para a seção */
@media (max-width: 768px) {
  .ml-products-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .ml-produto-card {
    padding: 1rem;
  }

  .ml-produto-card .ml-produto {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .ml-produto-card .ml-produto img {
    width: 80px;
    height: 80px;
    margin: 0 auto;
  }

  #mercado-livre-section {
    padding: 1rem;
  }

  #mercado-livre-section h2 {
    font-size: 2rem;
  }
}

#mercado-livre-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#discount {
  width: 100px;
  height: 30px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  padding: 5px;
  margin-left: 10px;
}

#filtroML {
  width: 180px;
  height: 30px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  padding: 5px;
  margin-left: 10px;
}

/* Animação fadeInUp */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilos para Checagem Manual */
.manual-check-modal {
  max-width: 95vw !important;
  max-height: 190vh !important;
  width: 900px !important;
  margin-top: 2vh !important; /* Posicionar mais para cima */
  margin-bottom: 2vh !important;
}

.manual-check-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 190vh;
}

.manual-check-header {
  flex-shrink: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.pallet-info h3 {
  margin: 0;
  font-size: 1.3rem;
}

.pallet-id {
  color: #ffe100;
  font-weight: bold;
}

.progress-info {
  text-align: right;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  width: 0%;
  transition: width 0.3s ease;
}

.progress-bar-value {
  width: 100%;
  height: 8px;
  background-color: #fef3c7;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill-value {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  width: 0%;
  transition: width 0.3s ease;
}

.scan-section {
  flex-shrink: 0;
  padding: 0.5rem; /* Reduzir de 1rem para 0.5rem */
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

#manual-check-input {
  flex: 1;
  padding: 12px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

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

#clear-scan {
  padding: 12px 15px;
  background: #be5340;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s ease;
}

#clear-scan:hover {
  background: #dc2626;
}

.table-container {
  flex: 1;
  overflow-y: auto;
  max-height: 25vh; /* Reduzir de 50vh para 35vh */
  border: 1px solid #e9ecef;
  border-radius: 4px;
  margin: 0.5rem 0; /* Reduzir de 1rem para 0.5rem */
  scroll-behavior: smooth;
}

.manual-check-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.manual-check-table th {
  background: #f8fafc;
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.manual-check-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.manual-check-table tr {
  transition: all 0.3s ease;
}

/* Status das linhas */
.status-pending {
  background: #fefefe;
}

.status-partial {
  background: #fef3c7;
  animation: pulse 2s infinite;
}

.status-correct {
  background: #dcfce7;
}

.status-incorrect {
  background: #fee2e2;
}

/* Status badges */
.status-badge {
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.pending {
  background: #f1f5f9;
  color: #64748b;
}

.status-badge.partial {
  background: #fbbf24;
  color: #92400e;
}

.status-badge.correct {
  background: #10b981;
  color: white;
}

.status-badge.incorrect {
  background: #ef4444;
  color: white;
}

/* Diferenças de valor */
.difference.positive {
  color: #dc2626;
  font-weight: bold;
}

.difference.negative {
  color: #059669;
  font-weight: bold;
}

.action-buttons {
  flex-shrink: 0;
  padding: 1rem;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: center;
  gap: 1rem;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.report-btn,
.finish-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 150px;
}

.report-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.report-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

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

.finish-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.report-btn:disabled,
.finish-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
  .manual-check-header {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .progress-info {
    width: 100%;
  }

  .progress-bar {
    width: 100%;
    height: 8px;
  }

  .table-container {
    max-height: 25vh; /* Reduzir ainda mais no mobile */
  }

  .action-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .report-btn,
  .finish-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

/* Animação de pulso para itens parciais */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Scrollbar customizada para a tabela */
.table-container::-webkit-scrollbar {
  width: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Estilos para toasts da checagem */
.swal2-toast {
  z-index: 99999 !important; /* Ficar acima do modal */
}

.swal2-toast .swal2-title {
  font-size: 14px !important;
  font-weight: 600 !important;
}

.swal2-toast .swal2-html-container {
  font-size: 12px !important;
  margin: 0 !important;
}

/* Garantir que o modal de checagem fique estável */
.manual-check-modal.swal2-popup {
  position: fixed !important;
  margin-top: 2vh !important;
  margin-bottom: 2vh !important;
  top: 2vh !important;
  transform: none !important;
}

/* Feedback visual simples para checagem */
.simple-feedback {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 100000;
  animation: slideInFeedback 0.3s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 300px;
  word-wrap: break-word;
}

.simple-feedback.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-left: 4px solid #065f46;
}

.simple-feedback.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border-left: 4px solid #991b1b;
}

.simple-feedback.complete {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  border-left: 4px solid #5b21b6;
  animation: slideInFeedback 0.3s ease-out, completePulse 1s ease-in-out 0.3s;
}

.simple-feedback.info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-left: 4px solid #1d4ed8;
}

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

@keyframes completePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Responsive para feedback */
@media (max-width: 768px) {
  .simple-feedback {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
    text-align: center;
  }
}

/* Responsive para pallet header */
@media (max-width: 768px) {
  .pallet-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .pallet-buttons {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .pallet-buttons button {
    flex: 1;
    font-size: 11px;
    padding: 6px 8px;
  }

  .table-container {
    max-height: 350px; /* Menor em mobile */
    font-size: 12px;
  }
}

/* Estilos para o modal do Mercado Livre */
.ml-modal-popup {
  border-radius: 15px !important;
}

.ml-search-header {
  text-align: center;
  margin-bottom: 20px;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  color: white;
}

.ml-search-header .discount-info {
  margin-top: 10px;
  color: #ffe100;
  font-weight: 600;
  font-size: 14px;
}

.ml-produtos-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
}

.ml-produto {
  display: flex;
  background: white;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ml-produto:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.ml-produto img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 15px;
  flex-shrink: 0;
}

.ml-produto-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ml-produto-info h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ml-preco {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #2d5a41;
}

.ml-preco-desconto {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #c0392b;
  background: #ffebee;
  padding: 4px 8px;
  border-radius: 4px;
  border-left: 3px solid #c0392b;
}

.ml-link {
  display: inline-block;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white !important;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  margin-top: auto;
}

.ml-link:hover {
  background: linear-gradient(135deg, #2980b9 0%, #1f4e79 100%);
  transform: translateY(-1px);
  text-decoration: none;
  color: white !important;
}

/* Botão para aplicar desconto no Bling */
.btn-aplicar-desconto {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 5px;
  text-align: center;
  display: inline-block;
  width: 100%;
}

.btn-aplicar-desconto:hover {
  background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

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

/* Responsivo para o modal do Mercado Livre */
@media (max-width: 768px) {
  .ml-produtos-container {
    grid-template-columns: 1fr;
    max-height: 400px;
  }

  .ml-produto {
    flex-direction: column;
    text-align: center;
  }

  .ml-produto img {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px auto;
  }
}

/* Botões de opções na tabela */
.product-options {
  text-align: center;
  white-space: nowrap;
}

.product-options button {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  margin: 0 2px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.product-options button:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.product-options button:active {
  transform: translateY(0);
}

/* Checkbox de impressão automática */
#impressao-automatica {
  margin-right: 8px;
  transform: scale(1.2);
}

/* Label para o checkbox */
.scan-section label {
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  margin-right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

#reset-local-btn {
  background: #4f9fe0;
  padding: 12px 15px;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s ease;
}

#discount-config {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
  margin-left: 10px;
  margin-right: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 10px;
  background-color: #f8fafc;
  flex-wrap: wrap;
}

.discount-label {
  font-size: 14px;
}

#discount-btn {
  background: linear-gradient(135deg, #7a97d4ee 0%, #1d4ed8 100%);
  padding: 12px 15px;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s ease;
}

#discount-btn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #7a97d4ee 100%);
}

.reset-password-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: blue;
  margin-top: 10px;
  display: inline-block;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.reset-password-link:hover {
  text-decoration: underline;
}

.copy-icon {
  display: inline-block;
  margin-left: 8px;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  vertical-align: middle;
}

.copy-icon:hover {
  background-color: #4f9fe0;
  border-color: #4f9fe0;
  color: white;
  transform: scale(1.1);
}

.barcode-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  margin-bottom: 10px;
  border: 1px solid #e2e8f0;
}

.product-barcode {
  max-width: 100%;
  height: auto;
}

/* Responsivo para códigos de barras */
@media (max-width: 768px) {
  .barcode-container {
    padding: 6px;
    margin-bottom: 8px;
  }

  .product-barcode {
    max-width: 90%;
  }
}

/* ===== ESTILOS PARA ESTRUTURA DE FOLDERS/ARQUIVOS ===== */

/* Container principal do arquivo/pasta */
.file-folder {
  margin-bottom: 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.file-folder:hover {
  border-color: #7c3aed;
  box-shadow: 0 6px 12px rgba(124, 58, 237, 0.15);
}

/* Cabeçalho do arquivo */
.file-header {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: white;
  padding: 15px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.file-header:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
}

/* Título do arquivo */
.file-title {
  font-size: 16px;
  font-weight: 600;
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-title::before {
  font-size: 18px;
}

/* Container dos pallets dentro do arquivo */
.pallets-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
  background-color: white;
}

.pallets-container.aberto {
  max-height: none; /* Remover limitação de altura para mostrar todos os pallets */
  opacity: 1;
}

/* Estilos para os pallets dentro dos arquivos */
.file-folder .pallet {
  margin: 10px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background-color: #f8fafc;
  transition: all 0.3s ease;
}

.file-folder .pallet:hover {
  border-color: #7c3aed;
  background-color: #f0f4ff;
}

.file-folder .pallet-header {
  padding: 12px 15px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.file-folder .pallet-header:hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

/* Botões dentro dos pallets nos arquivos */
.file-folder .pallet-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.file-folder .pallet-buttons button {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.file-folder .pallet-buttons button:first-child {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.file-folder .pallet-buttons button:first-child:hover {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  transform: translateY(-1px);
}

.file-folder .pallet-buttons button:last-child {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.file-folder .pallet-buttons button:last-child:hover {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  transform: translateY(-1px);
}

/* Lista de produtos dentro dos pallets nos arquivos */
.file-folder .produto-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
  padding: 0 15px;
}

.file-folder .produto-list.aberto {
  max-height: none; /* Remover limitação de altura para mostrar todos os produtos */
  opacity: 1;
  padding: 10px 15px 15px 15px;
}

/* Produtos dentro dos arquivos */
.file-folder .produto {
  background-color: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.file-folder .produto:hover {
  border-color: #7c3aed;
  background-color: #f8f9ff;
}

.file-folder .produto h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

/* Responsividade para folders */
@media (max-width: 768px) {
  .file-folder {
    margin-bottom: 10px;
    border-radius: 8px;
  }

  .file-header {
    padding: 12px 15px;
  }

  .file-title {
    font-size: 14px;
  }

  .file-folder .pallet {
    margin: 8px 10px;
  }

  .file-folder .pallet-header {
    padding: 10px 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .file-folder .pallet-buttons {
    width: 100%;
    justify-content: center;
  }

  .file-folder .pallet-buttons button {
    font-size: 11px;
    padding: 6px 10px;
  }
}

.lista-check {
  margin-bottom: 2em;
  margin-top: 2em;
  margin-left: 1em;
  width: 300px;
}

/* Button Styles */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-danger {
  background: var(--gradient-danger);
  color: white;
  border: none;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ============================================ */
/* LISTA DE CONFERÊNCIA - BOTÕES E ESTILOS */
/* ============================================ */

.conference-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.conference-btn {
  width: 300px;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  text-transform: none;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.conference-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.conference-btn:hover::before {
  width: 300px;
  height: 300px;
}

.conference-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.15),
    0 4px 8px -2px rgba(0, 0, 0, 0.1);
}

.conference-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.conference-btn span {
  position: relative;
  z-index: 1;
}

/* Botão Salvar Lista - Verde */
.conference-btn-save {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.conference-btn-save:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4),
    0 4px 10px -2px rgba(16, 185, 129, 0.2);
}

/* Botão Carregar Lista - Azul */
.conference-btn-load {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.conference-btn-load:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4),
    0 4px 10px -2px rgba(59, 130, 246, 0.2);
}

/* Ícones nos botões */
.conference-btn .icon {
  font-size: 18px;
  margin-right: 8px;
  vertical-align: middle;
  display: inline-block;
  transition: transform 0.3s ease;
}

.conference-btn:hover .icon {
  transform: scale(1.15);
}

/* Animação de loading nos botões */
.conference-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.conference-btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Efeito de destaque ao focar */
.conference-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3),
    0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Responsivo */
@media (max-width: 400px) {
  .conference-btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Multi-Marketplace Styles */
.marketplace-selector {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 200px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

.marketplace-selector:hover {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.marketplace-selector:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.marketplace-selector option {
  padding: 8px;
  background: white;
  color: #374151;
}

/* Multi-Marketplace Results */
.multi-marketplace-results {
  margin-top: 20px;
}

.marketplace-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  margin: 20px 0 15px 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.marketplace-header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

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

.ml-produto-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.ml-produto-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.ml-produto img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.ml-produto-info {
  padding: 15px;
}

.ml-produto-info h4 {
  margin: 0 0 10px 0;
  font-size: 16px;
  line-height: 1.4;
  color: #1f2937;
}

.ml-preco {
  font-size: 18px;
  font-weight: bold;
  color: #059669;
  margin: 8px 0;
}

.ml-preco-desconto {
  font-size: 16px;
  font-weight: bold;
  color: #dc2626;
  margin: 5px 0;
}

.ml-link {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-top: 10px;
}

.ml-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.error-info {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 10px;
  border-radius: 6px;
  margin: 10px 0;
}

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

/* Responsive adjustments for marketplace selector */
@media (max-width: 768px) {
  .marketplace-selector {
    min-width: 150px;
    font-size: 13px;
  }

  .marketplace-grid {
    grid-template-columns: 1fr;
  }
}
