.app-container {
  padding-top: 100px;
  min-height: 100vh;
  background-color: #f5f7fa;
}
.app-header {
  background-color: #2e7d32;
  color: #fff;
  text-align: center;
  padding: 20px 0;
  margin-bottom: 30px;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 12px #0000001a;
}
.app-header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}
.app-header p {
  font-size: 1.1rem;
  opacity: 0.9;
}
.app-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  background: white;
  padding: 10px;
  border-radius: 50px;
  box-shadow: 0 2px 10px #0000001a;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.app-tab {
  padding: 12px 25px;
  border: none;
  background: none;
  font-size: 1rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  border-radius: 25px;
  transition: all 0.3s ease;
}
.app-tab.active {
  background-color: #2e7d32;
  color: #fff;
}
.app-content {
  display: none;
  animation: fadeIn 0.5s ease;
}
.app-content.active {
  display: block;
}
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.dashboard-title {
  font-size: 1.5rem;
  color: #333;
}
.dashboard-filters {
  display: flex;
  gap: 15px;
}
.filter-select {
  padding: 8px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #fff;
  font-size: 0.9rem;
}
.piquetes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}
.piquete-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px #00000014;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}
.piquete-card:hover {
  transform: translateY(-7px) scale(1.02);
  box-shadow: 0 8px 32px #2e7d322e, 0 2px 8px #00000014;
  border-color: #2e7d32;
}
.btn-excluir-piquete {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #0006;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  z-index: 20;
  transition: background-color 0.2s ease, transform 0.2s ease;
  font-weight: 700;
}
.btn-excluir-piquete:hover {
  background-color: #ff0000b3;
  transform: scale(1.1);
}
.piquete-image {
  height: 180px;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: linear-gradient(90deg, #e8f5e9 60%, #f5f7fa 100%);
}
.piquete-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s cubic-bezier(0.4, 2, 0.6, 1);
}
.piquete-card:hover .piquete-image img {
  transform: scale(1.08) rotate(-1deg);
}
.piquete-status {
  position: absolute;
  top: 14px;
  left: 14px;
  background: linear-gradient(90deg, #2e7d32 80%, #43a047 100%);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 8px #2e7d321a;
  letter-spacing: 0.5px;
}
.status-warning {
  background: linear-gradient(90deg, #ff9800 80%, #ffc107 100%);
}
.status-alert {
  background: linear-gradient(90deg, #f44336 80%, #ff7043 100%);
}
.piquete-header {
  background: none;
  color: #2e7d32;
  padding: 14px 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.piquete-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.piquete-header span {
  font-size: 0.95rem;
  color: #888;
  font-weight: 500;
}
.piquete-body {
  padding: 18px 18px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.piquete-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 18px;
  margin-bottom: 12px;
}
.piquete-stat {
  text-align: center;
  padding: 10px 0 6px;
  background: #f8fafc;
  border-radius: 8px;
  box-shadow: 0 1px 3px #2e7d320a;
  transition: background 0.2s;
}
.piquete-stat h4 {
  margin: 0 0 3px;
  color: #2e7d32;
  font-size: 0.92rem;
  font-weight: 600;
}
.piquete-stat p {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #222;
  letter-spacing: 0.5px;
}
.piquete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 15px 0;
  text-align: center;
}
.piquete-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  background: linear-gradient(90deg, #2e7d32 80%, #43a047 100%);
  color: #fff;
  transition: all 0.3s ease;
}
.btn-view {
  background-color: #2e7d32;
  color: #fff;
}
.btn-view:hover {
  background-color: #1b5e20;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px #0000001a;
}
.upload-container {
  background: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 3px 15px #0000001a;
  max-width: 800px;
  margin: 0 auto;
}
.upload-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}
.upload-steps:before {
  content: "";
  position: absolute;
  top: 25px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #e0e0e0;
  z-index: 1;
}
.step {
  text-align: center;
  position: relative;
  z-index: 2;
}
.step-number {
  width: 50px;
  height: 50px;
  background-color: #e0e0e0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-weight: 700;
  color: #666;
  transition: all 0.3s ease;
}
.step.active .step-number,
.step.completed .step-number {
  background-color: #2e7d32;
  color: #fff;
}
.step-title {
  font-size: 0.9rem;
  color: #666;
  font-weight: 600;
}
.step.active .step-title {
  color: #2e7d32;
}
.upload-area {
  border: 2px dashed #ccc;
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.upload-area:hover {
  border-color: #2e7d32;
}
.upload-area i {
  font-size: 3rem;
  color: #2e7d32;
  margin-bottom: 15px;
}
.upload-area h3 {
  margin-bottom: 10px;
  color: #333;
}
.upload-area p {
  color: #666;
  margin-bottom: 0;
}
.upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}
.preview-item {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px #0000001a;
}
.preview-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
}
.preview-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 5px;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #00000080;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.preview-remove:hover {
  background: rgba(255, 0, 0, 0.8);
  color: #fff;
}
.dragover {
  border-color: #2e7d32 !important;
  background-color: #2e7d320d;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(46, 125, 50, 0.1);
  border-radius: 50%;
  border-top-color: #2e7d32;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}
@keyframes spin {
  0% {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}
#error-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #00000080;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.error-modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 5px;
  max-width: 400px;
  text-align: center;
}
.error-modal-actions {
  margin-top: 20px;
}
.results-container {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px #00000014;
  padding: 25px;
  margin-bottom: 30px;
  overflow: visible;
}
.results-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  color: #2e7d32;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}
.results-header i {
  font-size: 2rem;
  margin-right: 15px;
}
.results-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: #333;
}
.results-content {
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-height: none;
  overflow: visible;
}
.results-image-container {
  width: 100%;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  overflow: visible;
}
.results-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 500px;
  cursor: pointer;
  transition: opacity 0.3s;
}
.results-info {
  width: 100%;
  padding: 25px;
  background: linear-gradient(to bottom, #fff, #ffffff);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 300px;
  max-height: none;
  overflow: visible;
  position: relative;
}
.results-count {
  display: flex;
  align-items: center;
  background-color: #e8f5e9;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #2e7d32;
}
.count-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2e7d32;
  margin-right: 10px;
}
.count-value {
  font-size: 2rem;
  font-weight: 800;
  color: #1b5e20;
}
.results-details {
  color: #555;
  line-height: 1.6;
}
.results-details p {
  margin-bottom: 10px;
}
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #00000080;
  z-index: 1000;
  overflow-y: auto;
  padding: 50px 0;
}
.modal-content {
  background-color: #fff;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px #0003;
  animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.modal-header {
  background-color: #2e7d32;
  color: #fff;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}
.modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}
.modal-body {
  padding: 30px;
}
.results-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.results-stat-card {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e8f5e9 100%);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 3px 10px #2e7d321a;
  border-left: 4px solid #2e7d32;
  transition: transform 0.2s, box-shadow 0.2s;
}
.results-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px #2e7d3226;
}
.stat-icon {
  background-color: #2e7d321a;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}
.stat-icon i {
  font-size: 1.5rem;
  color: #2e7d32;
}
.stat-label {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 5px;
  font-weight: 500;
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2e7d32;
}
@media (min-width: 768px) {
  .results-content {
    flex-direction: row;
  }
  .results-image-container {
    max-width: 60%;
    flex: 2;
    max-height: none;
  }
  .results-info {
    width: 25%;
    padding: 30px;
    flex: 1;
  }
  .results-container {
    flex-direction: row;
    max-height: none;
  }
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  width: 100%;
  margin-top: 20px;
}
.preview-grid.single-card {
  display: flex;
  justify-content: center;
  align-items: center;
}
.preview-grid.single-card .preview-card {
  width: 560px;
  max-width: 90%;
}
.preview-card {
  animation: fadeInUp 0.5s ease;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.preview-card:hover {
  transform: translateY(-7px) scale(1.02);
  box-shadow: 0 8px 32px #2e7d322e, 0 2px 8px #00000014;
}
.error-item {
  background-color: #fff3f3;
  border-radius: 12px;
  padding: 15px;
  border-left: 4px solid #f44336;
  box-shadow: 0 2px 8px #00000014;
}
.error-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.error-header h4 {
  margin: 0;
  color: #333;
}
.error-message {
  color: #f44336;
  font-size: 0.9rem;
}
.results-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 20px;
}
.results-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}
.results-header i {
  font-size: 2rem;
  color: #2e7d32;
  margin-right: 15px;
}
@media (max-width: 768px) {
  .preview-grid {
    grid-template-columns: 1fr;
  }
}
.results-header h3 {
  font-size: 1.5rem;
  color: #333;
  margin: 0;
}
@media (max-width: 767px) {
  .results-stats {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .stat-icon {
    width: 40px;
    height: 40px;
  }
  .stat-icon i {
    font-size: 1.2rem;
  }
  .stat-value {
    font-size: 1.75rem;
  }
  .step-title {
    font-size: 0.7rem;
    color: #666;
    font-weight: 600;
  }
}
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.piquete-card[data-id] {
  animation: fadeInUp 0.5s ease;
  border-color: #43a047;
}
.upload-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding: 0 20px;
}
.upload-btn {
  padding: 10px 20px;
  border: none;
  background-color: #1b5e20;
  color: #fff;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.upload-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-back {
  background-color: #1b5e20;
  color: #fff;
  border: 1px solid #ddd;
}
.btn-back:not(:disabled):hover {
  background-color: #e0e0e0;
  color: #333;
}
.btn-next {
  background-color: #2e7d32;
  color: #fff;
}
.btn-next:not(:disabled):hover {
  background-color: #1b5e20;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px #2e7d3233;
}
.fullscreen-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000e6;
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.fullscreen-modal img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}
.fullscreen-modal-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: 700;
  cursor: pointer;
}
.results-image:hover {
  opacity: 0.8;
}
.progress-bar-container {
  width: 100%;
  height: 20px;
  background-color: #e0e0e0;
  border-radius: 10px;
  margin: 20px 0;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2e7d32 0%, #43a047 100%);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 10px;
}
.result-item {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px #0000001a;
  margin-bottom: 20px;
  overflow: hidden;
  width: 100%;
}
.result-header {
  background-color: #f5f5f5;
  padding: 12px 15px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.result-header h4 {
  margin: 0;
  font-size: 1rem;
  color: #333;
}
.result-error {
  color: #e53935;
  font-size: 0.9rem;
}
.result-content {
  display: flex;
  flex-wrap: wrap;
  padding: 15px;
}
@media (min-width: 769px) {
  .results-content {
    display: flex;
    flex-direction: column !important;
    gap: 25px;
  }
  .result-content {
    flex-direction: row;
  }
  .result-image {
    flex: 1;
    min-width: 250px;
    margin-right: 20px;
    margin-bottom: 15px;
  }
  .result-stats {
    flex: 1;
    min-width: 250px;
  }
}
.result-image img {
  width: 100%;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.result-image img:hover {
  transform: scale(1.02);
}
.result-stats {
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
}
.result-stat {
  display: flex;
  align-items: center;
  background-color: #f8f8f8;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.stat-icon {
  width: 40px;
  height: 40px;
  background-color: #2e7d321a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}
.stat-icon i {
  color: #2e7d32;
  font-size: 1.2rem;
}
.stat-content {
  flex: 1;
}
.stat-label {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 5px;
}
.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
}
@media (max-width: 768px) {
  .result-content {
    flex-direction: column;
  }
  .result-image {
    margin-right: 0;
  }
}
.fullscreen-modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.fullscreen-modal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.fullscreen-modal-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.fullscreen-modal-close:hover {
  color: #bbb;
}

.btn-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: #e53935;
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-remove:hover {
  background-color: #b71c1c;
  transform: scale(1.1);
}
.upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.preview-card {
  position: relative;
  width: 125px;
  height: 125px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px #0000001a;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}


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

.preview-card p {
  position: absolute;
  bottom: 5px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 0.75rem;
  padding: 2px 5px;
  border-radius: 4px;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* Botão de remover */
.preview-card .btn-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: #ff3b3b;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-card .btn-remove:hover {
  background-color: #c10000;
}

.result-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px #00000014;
  padding: 15px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.result-image img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  cursor: pointer;
  border-radius: 8px;
}

.result-info {
  flex: 1;
}
