/* 
   Arquivo: css/componentes.css
   Objetivo: Estilos dos elementos que reutilizaremos bastante (Botões, Cards, Inputs, Modais)
*/

/* -------------- CARTÕES E SUPERFÍCIES -------------- */
.card {
  background-color: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  /* Isso é o que causa o desfoque de fundo atrás do cartão transparente */
  backdrop-filter: blur(12px); 
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* -------------- BOTÕES -------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  outline: none;
}

.btn:active {
  transform: scale(0.97);
}

/* Tamanhos de Botão */
.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}
.btn-lg {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* Cores de Botão */
.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Sombra mais sóbria/corporativa */
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--surface-border);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.btn-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
  background-color: rgba(239, 68, 68, 0.2);
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

/* -------------- INSERÇÃO DE DADOS (INPUTS E SELECTS) -------------- */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.form-control::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* -------------- PILL (Etiquetas de Categoria / Status) -------------- */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid var(--surface-border);
}

.badge-primary {
  background-color: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

/* -------------- MODAL -------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  width: 90%;
  max-width: 600px;
  background-color: #1a1d24;
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.25rem;
  margin: 0;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-footer {
  padding: 1.2rem 1.5rem;
  border-top: 1px solid var(--surface-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  background-color: rgba(0, 0, 0, 0.2);
}
