/* Projetos Section Styles */

.projetos-section {
  padding: 2rem;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
}

.section-header h2 {
  font-size: 1.8rem;
  color: #333;
  margin: 0;
}

.section-content {
  display: flex;
  flex-direction: column;
}

.project-counter {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1FD084;
  background: rgba(31, 208, 132, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 2px solid #1FD084;
}

.btn-archived-toggle {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: #999;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: all 0.2s;
  font-weight: 600;
}

.btn-archived-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
}

.btn-back-archived {
  background: #1FD084;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  font-size: 14px;
  height: 40px;
  display: flex;
  align-items: center;
}

.archived-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1rem;
}

.archived-header-left {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1;
}

.archived-header-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  min-height: 200px;
  padding: 1rem;
  border-radius: 12px;
  border: 2px dashed transparent;
  transition: none;
  position: relative;
  width: 100%;
}

.projects-grid.drag-over {
  border-color: #1FD084;
  background: rgba(31, 208, 132, 0.05);
}

.project-card.free-dragging {
  opacity: 1;
  cursor: grabbing;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25) !important;
}

/* Garantir que o grid mantenha o layout durante drag */
.projects-grid {
  position: relative;
  min-height: 200px;
  box-sizing: border-box;
}

.section-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

/* Placeholder durante drag */
.drag-placeholder {
  box-sizing: border-box;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #999;
}

.empty-state p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.empty-state .hint {
  font-size: 0.95rem;
  color: #bbb;
}

/* Button Styles - Specific for Projects Section */
.projetos-section .btn-action,
.projetos-section .btn {
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.projetos-section .btn-action-primary,
.projetos-section .btn-primary {
  background: transparent !important;
  color: #1FD084 !important;
  border: 2px solid #1FD084 !important;
  padding: 10px 20px !important;
  border-radius: 20px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  transition: all 0.2s !important;
  line-height: 1.5 !important;
  min-height: 40px !important;
}

.projetos-section .btn-action-primary:hover,
.projetos-section .btn-primary:hover {
  background: #1FD084 !important;
  color: white !important;
}

.projetos-section .btn-action-secondary,
.projetos-section .btn-secondary,
.projetos-section button.btn-secondary,
.projetos-section #btn-view-archived-main {
  background: #6c757d !important;
  color: white !important;
  border: 2px solid #6c757d !important;
  padding: 10px 20px !important;
  border-radius: 20px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  transition: all 0.3s ease !important;
  line-height: 1.5 !important;
  min-height: 40px !important;
  box-shadow: none !important;
}

.projetos-section .btn-action-secondary:hover,
.projetos-section .btn-secondary:hover,
.projetos-section button.btn-secondary:hover,
.projetos-section #btn-view-archived-main:hover {
  background: white !important;
  border-color: transparent !important;
  color: #6c757d !important;
  box-shadow: none !important;
}

.projetos-section .btn-action-secondary:disabled,
.projetos-section .btn-secondary:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* Responsive */
@media (max-width: 768px) {
  .projetos-section {
    padding: 1rem;
  }

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


/* Project Detail Page Styles */
.project-detail-page {
  padding: 2rem;
  background: #f8f9fa;
  min-height: 100vh;
  position: relative;
}

.detail-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
}

.btn-back-detail {
  position: relative;
  display: inline-block;
  background: #1FD084;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
  z-index: 10;
  font-size: 14px;
  height: 40px;
  line-height: 1;
  display: flex;
  align-items: center;
}

.btn-back-detail:hover {
  background: #18B870;
  transform: translateX(2px);
}

.btn-edit-detail {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: #1FD084;
  border: 2px solid #1FD084;
  padding: 0.75rem 1.5rem;
  border-radius: 24px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
  z-index: 10;
  font-size: 14px;
  height: 40px;
  overflow: hidden;
}

.btn-edit-detail::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #1FD084;
  z-index: -1;
  transition: left 0.3s ease;
}

.btn-edit-detail:hover {
  color: white;
}

.btn-edit-detail:hover::before {
  left: 0;
}

.btn-archive-detail {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 2px solid #999;
  color: #999;
  padding: 0.75rem 1.5rem;
  border-radius: 24px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
  z-index: 10;
  font-size: 14px;
  height: 40px;
  overflow: hidden;
}

.btn-archive-detail::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #999;
  z-index: -1;
  transition: left 0.3s ease;
}

.btn-archive-detail:hover {
  color: white;
}

.btn-archive-detail:hover::before {
  left: 0;
}

.btn-archive-detail.archived {
  border-color: #00D9FF;
  color: #00D9FF;
}

.btn-archive-detail.archived::before {
  background: #00D9FF;
}

.btn-delete-detail {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: #FF9500;
  border: 2px solid #FF9500;
  padding: 0.75rem 1.5rem;
  border-radius: 24px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
  z-index: 10;
  font-size: 14px;
  height: 40px;
  overflow: hidden;
}

.btn-delete-detail::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #FF9500;
  z-index: -1;
  transition: left 0.3s ease;
}

.btn-delete-detail:hover {
  color: white;
}

.btn-delete-detail:hover::before {
  left: 0;
}

.status-badge-detail {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge-detail.active {
  background: rgba(31, 208, 132, 0.15);
  color: #1FD084;
}

.status-badge-detail.completed {
  background: rgba(0, 217, 255, 0.15);
  color: #00D9FF;
}

.status-badge-detail.archived {
  background: linear-gradient(135deg, rgba(31, 208, 132, 0.15) 0%, rgba(0, 217, 255, 0.15) 100%);
  color: #1FD084;
}

.status-badge-detail.planning {
  background: rgba(255, 193, 7, 0.15);
  color: #FFC107;
}

/* Detail Info Section */
.detail-info-section {
  margin-bottom: 2rem;
}

.detail-header-inside {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.detail-header-inside h1 {
  margin: 0;
  color: #00BCD4;
  font-size: 1.8rem;
  flex: 1;
}

.info-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
}

.info-card h3 {
  margin-top: 0;
  color: #1FD084;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-label {
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 1rem;
  color: #333;
  font-weight: 500;
}

/* Detail Financial Section */
.detail-financial-section {
  margin-bottom: 2rem;
}

.detail-financial-section h2 {
  color: #1FD084;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.financial-cards-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.financial-card-detail {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 1rem;
  border-left: 5px solid #007bff;
  transition: all 0.2s;
  border: 1px solid #f0f0f0;
}

.financial-card-detail:hover {
  box-shadow: 0 4px 16px rgba(31, 208, 132, 0.15);
}

.financial-card-detail.receita {
  border-left-color: #00BCD4;
  background: white;
}

.financial-card-detail.receita .card-value {
  color: #00BCD4 !important;
}

.financial-card-detail.gastos {
  border-left-color: #FF9800;
  background: white;
}

.financial-card-detail.gastos .card-value {
  color: #FF9800 !important;
}

.financial-card-detail.lucro.positivo {
  border-left-color: #1FD084;
  background: white;
}

.financial-card-detail.lucro.positivo .card-value {
  color: #1FD084 !important;
}

.financial-card-detail.lucro.negativo {
  border-left-color: #dc3545;
  background: white;
}

.financial-card-detail.lucro.negativo .card-value {
  color: #dc3545 !important;
}

.card-icon {
  font-size: 2rem;
  min-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.financial-card-detail.receita .card-icon {
  color: #00BCD4;
}

.financial-card-detail.gastos .card-icon {
  color: #FF9800;
}

.financial-card-detail.lucro.positivo .card-icon {
  color: #1FD084;
}

.financial-card-detail.lucro.negativo .card-icon {
  color: #dc3545;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.card-label {
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  font-weight: 600;
}

.card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
}

.card-subtitle {
  font-size: 0.8rem;
  color: #999;
}

/* Responsive */
@media (max-width: 768px) {
  .project-detail-page {
    padding: 1rem;
  }

  .detail-page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-header-inside h1 {
    font-size: 1.3rem;
  }

  .financial-cards-detail {
    grid-template-columns: 1fr;
  }
}

/* Management Cards Section */
.management-cards-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.management-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
}

.management-card:hover {
  box-shadow: 0 4px 16px rgba(31, 208, 132, 0.15);
  transform: translateY(-2px);
}

.management-card-content {
  flex: 1;
}

.management-card-content h3 {
  margin: 0;
  color: #1FD084;
  font-size: 1.2rem;
  font-weight: 700;
}

.management-card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.management-card-arrow svg {
  transition: transform 0.3s ease;
}

.management-card:hover .management-card-arrow svg {
  transform: translateX(5px);
}

/* Responsive para Management Cards */
@media (max-width: 768px) {
  .management-cards-section {
    grid-template-columns: 1fr;
  }

  .management-card {
    padding: 1.5rem;
  }

  .management-card-content h3 {
    font-size: 1.1rem;
  }
}


/* Form Styles for Detail Pages */
.expense-form-detail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group-detail {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group-detail label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.form-group-detail input,
.form-group-detail select {
  padding: 10px 12px;
  border: 2px solid #e8e8e8;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
}

.form-group-detail input:focus,
.form-group-detail select:focus {
  outline: none;
  border-color: #1FD084;
  box-shadow: 0 0 0 3px rgba(31, 208, 132, 0.1);
}

.btn-add-expense-detail {
  background: #1FD084;
  color: white;
  border: 2px solid #1FD084;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  align-self: flex-start;
}

.btn-add-expense-detail:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-add-recebimento {
  width: auto !important;
  display: inline-block !important;
  align-self: flex-start !important;
}

.btn-add-recebimento:hover {
  background-color: #1FD084 !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(31, 208, 132, 0.3) !important;
}

.btn-add-recebimento:active {
  transform: translateY(0) !important;
}

.no-expenses-detail {
  text-align: center;
  padding: 2rem;
  color: #999;
  font-size: 14px;
}

@media (max-width: 768px) {
  .form-row-detail {
    grid-template-columns: 1fr;
  }
}
