/* Análise de Crédito Specific Styles */

body {
  background-color: #e9ecef;
}

/* 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;
}

.analysis-container {
  min-height: 100vh;
}

/* Header */
.analysis-header {
  background: transparent;
  color: #2c3e50;
  margin-bottom: 2rem;
}

.analysis-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.analysis-header p {
  font-size: 1.1rem;
  color: #6c757d;
}

/* Progress Steps */
.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  margin-bottom: 2rem;
}

.progress-steps .step {
  flex: 1;
  text-align: center;
  position: relative;
}

.progress-steps .step-bar {
  height: 4px;
  background-color: #e9ecef;
  margin-bottom: 0.75rem;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.progress-steps .step.active .step-bar {
  background-color: #28a745;
}

.progress-steps .step.completed .step-bar {
  background-color: #28a745;
}

.progress-steps .step-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: #adb5bd;
  transition: all 0.3s ease;
}

.progress-steps .step.active .step-label {
  color: #28a745;
  font-weight: 600;
}

.progress-steps .step.completed .step-label {
  color: #28a745;
}

/* Cards */
.analysis-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.analysis-card .card-title {
  color: #2c3e50;
  font-weight: 600;
  font-size: 1.25rem;
}

/* Form Controls */
.form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.5rem;
}

.form-control,
.form-select {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

.form-control::placeholder {
  color: #adb5bd;
}

/* Buttons */
.main-content .btn {
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-success {
  background-color: #28a745;
  border-color: #28a745;
}

.btn-success:hover {
  background-color: #218838;
  border-color: #1e7e34;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-outline-secondary {
  border-color: #6c757d;
  color: #6c757d;
}

.btn-outline-secondary:hover {
  background-color: #6c757d;
  border-color: #6c757d;
  color: white;
}

.btn-outline-secondary:disabled {
  background-color: #e9ecef;
  border-color: #dee2e6;
  color: #adb5bd;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Table */
.table {
  margin-bottom: 0;
}

.table thead th {
  border-bottom: 2px solid #dee2e6;
  color: #495057;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.table tbody td {
  vertical-align: middle;
  padding: 1rem;
}

.table-hover tbody tr:hover {
  background-color: #f8f9fa;
}

/* Badge */
.badge {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .analysis-header h1 {
    font-size: 1.75rem;
  }

  .analysis-header p {
    font-size: 0.95rem;
  }

  .progress-steps .step-label {
    font-size: 0.8rem;
  }

  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-pane.show {
  animation: fadeIn 0.3s ease;
}

/* Icons */
.card-title i {
  font-size: 1.1rem;
}

/* Range Slider */
.form-range {
  height: 8px;
  border-radius: 4px;
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: white;
  border: 3px solid #28a745;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  margin-top: -15px;
}

.form-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: white;
  border: 3px solid #28a745;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.form-range::-webkit-slider-runnable-track {
  height: 8px;
  background: transparent;
  border-radius: 4px;
}

.form-range::-moz-range-track {
  height: 8px;
  background: transparent;
  border-radius: 4px;
}

/* AI Analysis Modal */
.ai-brain-icon i {
  animation: brainPulse 2s ease-in-out infinite;
}

@keyframes brainPulse {
  0%,
  100% {
    transform: rotate(-5deg);
  }

  50% {
    transform: rotate(5deg);
  }
}

.modal-content {
  border-radius: 16px;
}

/* Status Badges */
.badge-status {
  padding: 6px 14px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.725rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  display: inline-block;
}

.status-aprovado {
  background-color: #d1fae5;
  color: #065f46;
}

.status-pendente {
  background-color: #fef3c7;
  color: #92400e;
}

.status-reprovado {
  background-color: #fee2e2;
  color: #991b1b;
}

.status-em_analise {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-cancelado {
  background-color: #f3f4f6;
  color: #374151;
}

/* Analysis Table */
.analysis-table thead th {
  background-color: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid #f1f5f9;
}

.analysis-table tbody td {
  padding: 1.25rem;
  color: #334155;
  font-size: 0.9rem;
  border-bottom: 1px solid #f1f5f9;
}

.analysis-table tbody tr {
  transition: all 0.2s ease;
}

.analysis-table tbody tr:hover {
  background-color: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.customer-name {
  font-weight: 600;
  color: #1e293b;
}

.customer-cpf {
  font-size: 0.8rem;
  color: #64748b;
}

.btn-action {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  color: #64748b;
}

.btn-action:hover {
  background-color: #f1f5f9;
  color: #28a745;
}

/* Bank Selection */
.bank-card {
  border: 2px solid #f1f5f9;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bank-card:hover {
  border-color: #28a745;
  background-color: #f8fff9;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.1);
}

.bank-card.selected {
  border-color: #28a745;
  background-color: #f0fff4;
  box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
}

.bank-logo {
  width: 48px;
  height: 48px;
  background-color: #f8fafc;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  color: #64748b;
  transition: all 0.2s ease;
}

.bank-card:hover .bank-logo,
.bank-card.selected .bank-logo {
  background-color: #28a745;
  color: white;
}

.bank-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: #1e293b;
}

/* Upload Area */
.upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: #28a745;
  background-color: #f8fff9;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-remove-file {
  color: #ef4444;
  cursor: pointer;
  padding: 4px;
}

/* Document Upload Cards */
.doc-upload-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  height: 100%;
}

.doc-upload-card:hover {
  border-color: #28a745;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.05);
}

.doc-upload-card.has-file {
  border-color: #28a745;
  background-color: #f0fff4;
}

.doc-icon {
  width: 40px;
  height: 40px;
  background: #f8fafc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.doc-upload-card.has-file .doc-icon {
  background: #28a745;
  color: white;
}

.doc-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.doc-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-status {
  font-size: 0.75rem;
  margin-top: 2px;
}

.btn-upload {
  font-size: 0.75rem !important;
  padding: 4px 10px !important;
  white-space: nowrap;
}

/* File Preview Item */
.file-preview-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.file-name {
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.btn-remove-doc {
  color: #ef4444;
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px;
  font-size: 0.9rem;
}

/* Product Selection */
.product-card {
  border: 2px solid #f1f5f9;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.product-card:hover {
  border-color: #28a745;
  background-color: #f8fff9;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.1);
}

.product-card.selected {
  border-color: #28a745;
  background-color: #f0fff4;
  box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
}

.product-icon {
  width: 48px;
  height: 48px;
  background-color: #f8fafc;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  color: #64748b;
  transition: all 0.2s ease;
}

.product-card:hover .product-icon,
.product-card.selected .product-icon {
  background-color: #28a745;
  color: white;
}

.product-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e293b;
}

.product-desc {
  font-size: 0.75rem;
  color: #64748b;
}
