/* Estudo de Viabilidade Specific Styles */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  background-color: #218838;
  transform: scale(1.05);
}

.mobile-menu-toggle i {
  font-size: 20px;
}

/* Hide hamburger button when sidebar is open */
.mobile-menu-toggle.hide {
  display: none !important;
}

/* Mobile close button (X) in sidebar */
.mobile-close-btn {
  display: none;
  color: #dc3545;
  font-size: 22px;
  padding: 5px 10px;
  border: none;
  background: transparent;
  transition: all 0.2s ease;
}

.mobile-close-btn:hover {
  background-color: rgba(220, 53, 69, 0.1);
  color: #c82333;
  transform: scale(1.1);
}

.mobile-close-btn i {
  font-weight: bold;
}

/* Desktop toggle button (chevron) */
.desktop-toggle-btn {
  display: block;
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
  display: block;
  opacity: 1;
}

.estudos-section {
  background-color: #f8f9fa;
  min-height: calc(100vh - 250px);
}

.estudos-section h4 {
  color: #2c3e50;
  font-weight: 600;
}

/* Table Styles */
.table {
  font-size: 0.9rem;
}

.table thead th {
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  padding: 1rem;
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
  color: #212529;
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Badge Styles */
.badge-tipo {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.85rem;
}

.badge-residencial {
  background-color: #e3f2fd;
  color: #1976d2;
}

.badge-comercial {
  background-color: #fff3e0;
  color: #f57c00;
}

.badge-misto {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

/* VGV Value Styles */
.vgv-value {
  font-weight: 600;
  color: #28a745;
  font-size: 1rem;
}

/* Action Button Styles */
.btn-visualizar {
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-visualizar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #6c757d;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state h5 {
  margin-bottom: 0.5rem;
  color: #495057;
}

.empty-state p {
  margin-bottom: 1.5rem;
}

/* Card Styles */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    width: 250px !important;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  /* Hide desktop toggle button on mobile */
  .sidebar .desktop-toggle-btn {
    display: none !important;
  }

  /* Show mobile close button when sidebar is open */
  .sidebar.show .mobile-close-btn {
    display: block;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .main-content.sidebar-collapsed {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .header {
    padding: 1rem !important;
  }

  .header .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
  }

  .table {
    font-size: 0.8rem;
  }

  .table thead th,
  .table tbody td {
    padding: 0.75rem 0.5rem;
  }

  .btn-visualizar {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* Desktop styles */
@media (min-width: 769px) {
  .mobile-close-btn {
    display: none !important;
  }

  .desktop-toggle-btn {
    display: block !important;
  }
}

/* Loading State */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
  color: #28a745;
}

/* Novo Estudo Form Styles */
.novo-estudo-section {
  background-color: #f8f9fa;
  min-height: calc(100vh - 250px);
}

.novo-estudo-section h2 {
  color: #2c3e50;
  font-weight: 700;
  font-size: 2rem;
}

.novo-estudo-section .text-muted {
  font-size: 1rem;
}

/* Centered Form Card */
.form-card-centered {
  max-width: 900px;
  margin: 0 auto;
}

.novo-estudo-section .form-label {
  font-weight: 600;
  color: #495057;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.novo-estudo-section .form-control,
.novo-estudo-section .form-select {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  background-color: #f1f5f9;
  color: #1e293b;
  transition: all 0.2s ease;
}

.novo-estudo-section .form-control:focus,
.novo-estudo-section .form-select:focus {
  background-color: #ffffff;
  border-color: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
  outline: none;
}

.novo-estudo-section .form-control::placeholder {
  color: #94a3b8;
  font-size: 0.95rem;
}

/* Custom Checkbox Styles */
.form-check-input-custom {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  appearance: none;
  background-color: #fff;
  transition: all 0.2s;
  position: relative;
}

.form-check-input-custom:checked {
  background-color: #22c55e;
  border-color: #22c55e;
}

.form-check-input-custom:checked::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: white;
  font-size: 0.75rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.form-check-label {
  color: #475569;
  font-weight: 500;
}

/* Submit Button */
.btn-lg.px-5 {
  padding-left: 3rem !important;
  padding-right: 3rem !important;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.btn-lg.px-5:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

/* Required asterisk */
.text-danger {
  color: #dc3545 !important;
}

/* Voltar button */
#voltarHistoricoBtn {
  border-radius: 8px;
  padding: 0.5rem 1.2rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

#voltarHistoricoBtn:hover {
  background-color: #6c757d;
  color: white;
  border-color: #6c757d;
}

/* Relatório Section Styles */
.relatorio-section {
  background-color: #f8f9fa;
  min-height: calc(100vh - 250px);
}

.relatorio-section h2 {
  color: #2c3e50;
  font-weight: 700;
  font-size: 2rem;
}

.relatorio-section .card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.relatorio-section .card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.relatorio-section .card-title {
  color: #2c3e50;
  font-weight: 600;
  font-size: 1rem;
}

.relatorio-section .info-item {
  margin-bottom: 0.75rem;
}

.relatorio-section .info-item small {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.relatorio-section .info-item div {
  font-size: 0.95rem;
  color: #495057;
  font-weight: 500;
}

/* Chart containers */
.relatorio-section canvas {
  max-height: 250px;
}

/* Fazer Novo Balanço button */
#fazerNovoBalanco {
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
}

#fazerNovoBalanco:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

/* Loading Section Styles */
.loading-section {
  background-color: #f1f5f9;
  min-height: calc(100vh - 250px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-container {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.loading-container h3 {
  color: #0f172a;
  font-weight: 800;
  font-size: 2.25rem;
  margin-top: 1rem;
}

.loading-container p {
  color: #64748b;
  font-size: 1.15rem;
  line-height: 1.5;
  margin-top: 1rem;
}

/* Robot Container */
.robot-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 1rem;
}

.robot-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  z-index: 2;
}

.robot-icon i {
  font-size: 2.5rem;
  color: #22c55e;
}

/* Spinning Circle (Progress Ring Style) */
.spinning-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 140px;
  height: 140px;
  border: 4px solid #e2e8f0;
  border-top-color: #22c55e;
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
  z-index: 1;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Loading Steps */
.loading-steps {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: nowrap;
  margin-top: 4rem;
}

.loading-step {
  background-color: white;
  border-radius: 10px;
  padding: 0.8rem 1.25rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(15px);
  animation: slideUp 0.6s ease forwards;
  white-space: nowrap;
}

.loading-step i {
  font-size: 1.1rem;
  color: #22c55e !important;
}

.loading-step span {
  color: #475569;
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Staggered animation for each step */
#step1 {
  animation-delay: 0.2s;
}

#step2 {
  animation-delay: 0.5s;
}

#step3 {
  animation-delay: 0.8s;
}

#step4 {
  animation-delay: 1.1s;
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cenários Boxes */
.cenario-box {
  background-color: #f8f9fa;
  border-radius: 12px;
  padding: 24px;
  height: 100%;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.cenario-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.cenario-box h6 {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  margin-top: 0;
}

.cenario-box ul {
  padding-left: 0;
}

.cenario-box li {
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: #495057;
}

.cenario-box li strong {
  color: #212529;
}

.cenario-box li:last-child {
  margin-bottom: 0;
}

.cenario-conservador {
  border-top: 4px solid #6c757d;
}

.cenario-realista {
  border-top: 4px solid #28a745;
  background-color: rgba(40, 167, 69, 0.02);
}

.cenario-otimista {
  border-top: 4px solid #198754;
  background-color: rgba(25, 135, 84, 0.05);
}

.cenario-box i {
  font-size: 1.1rem;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .loading-steps {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .loading-container h3 {
    font-size: 1.75rem;
  }

  .loading-container p {
    font-size: 1rem;
  }

  .loading-step {
    width: 100%;
    max-width: 280px;
  }
}