/* ========== SISTEMA DE CORES E VARIÁVEIS ========== */
:root {
  /* Cores Principais */
  --primary-blue: #1e40af;
  --primary-blue-light: #3b82f6;
  --primary-blue-lighter: #60a5fa;
  --primary-blue-dark: #1e3a8a;
  --primary-blue-darker: #1e3a8a;

  --primary-yellow: #fbbf24;
  --primary-yellow-light: #fcd34d;
  --primary-yellow-dark: #f59e0b;
  --primary-yellow-darker: #d97706;

  --white: #ffffff;
  --off-white: #fefefe;
  --light-gray: #f8f9fa;
  --medium-gray: #e9ecef;
  --dark-gray: #6c757d;
  --text-dark: #1f2937;
  --text-medium: #374151;

  /* Gradientes */
  --gradient-blue: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 70%, #6366f1 100%);
  --gradient-yellow: linear-gradient(135deg, var(--primary-yellow) 0%, var(--primary-yellow-dark) 100%);
  --gradient-background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(219, 234, 254, 0.4) 50%,
    rgba(255, 255, 255, 0.9) 100%
  );

  /* Sombras */
  --shadow-sm: 0 4px 15px rgba(30, 64, 175, 0.08);
  --shadow-md: 0 8px 30px rgba(30, 64, 175, 0.12);
  --shadow-lg: 0 20px 60px rgba(30, 64, 175, 0.15);
  --shadow-yellow: 0 6px 20px rgba(251, 191, 36, 0.3);

  /* Transições */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========== RESET E BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--light-gray);
  overflow-x: hidden;
}

/* ========== TIPOGRAFIA ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary-blue-dark);
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* ========== HEADER MODERNO ========== */
.new-header {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  padding: 1.5rem 0;
  box-shadow: 0 4px 20px rgba(30, 64, 175, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Container override - força layout específico */
header.new-header .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

header.new-header .new-header-content {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  gap: 2rem !important;
  width: 100% !important;
  text-align: center !important;
}

header.new-header .new-header-logo {
  justify-self: flex-start !important;
}

header.new-header .new-header-title {
  justify-self: center !important;
  text-align: center !important;
  margin: 0 !important;
}

header.new-header .btn {
  justify-self: flex-end !important;
}

/* Improved logo sizing and positioning */
.new-header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  justify-self: flex-start;
}

.new-header-logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Better title styling with improved typography */
header.new-header .new-header-title {
  font-size: 2.5rem !important;
  font-weight: 800 !important;
  color: white !important;
  margin: 0 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  letter-spacing: -0.02em !important;
  text-align: center !important;
  justify-self: center !important;
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1.1rem;
  white-space: nowrap;
}

/* Enhanced button styling with better hover effects */
.btn-outline-white {
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.25);
}

.btn-primary {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}
/* ========== DASHBOARD CONTAINER ========== */
.dashboard-container {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.dashboard-container > h1 {
  font-size: 2.5rem;
  font-weight: 900;
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 3rem;
  text-align: center;
}

/* ========== CARDS DE ESTATÍSTICAS ========== */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.stat-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  padding: 2px;
  background: var(--gradient-yellow);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask-composite: xor;
  opacity: 0;
  transition: var(--transition-smooth);
}

.stat-card:hover:before {
  opacity: 1;
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stat-card-icon {
  font-size: 2rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-blue);
  border-radius: 50%;
  color: var(--white);
}

.stat-card-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.stat-card-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========== TABELA DE PROJETOS ========== */
.projects-table-container {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--medium-gray);
}

.projects-table {
  width: 100%;
  border-collapse: collapse;
}

.projects-table thead {
  background: var(--gradient-blue);
}

.projects-table th {
  padding: 1.5rem 1rem;
  text-align: left;
  font-weight: 700;
  color: var(--white);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.projects-table td {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--medium-gray);
  vertical-align: middle;
}

.projects-table tbody tr {
  transition: var(--transition-smooth);
}

.projects-table tbody tr:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(251, 191, 36, 0.03) 100%);
}

.project-badge {
  max-width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary-yellow);
  margin-right: 0.5rem;
  transition: var(--transition-bounce);
}

.project-badge:hover {
  transform: scale(1.2) rotate(8deg);
  box-shadow: var(--shadow-yellow);
}
.youtube-thumbnail-badge {
  max-width: 120px;
  border-radius: 8px;
  border: 2px solid var(--primary-yellow);
  transition: var(--transition-bounce);
}
.youtube-thumbnail-badge:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-yellow);
}
.project-table-title {
    color: var(--primary-blue-dark);
}

/* ========== BOTÕES MODERNOS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 0.9rem;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.btn:hover:before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-blue);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
  background: var(--primary-blue);
  color: var(--white);
  transform: translateY(-3px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: var(--white);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-3px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* ========== FORMULÁRIOS ========== */
.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--primary-blue-dark);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.form-control {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--medium-gray);
  border-radius: 12px;
  font-size: 1rem;
  transition: var(--transition-smooth);
  background: var(--white);
}

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

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}
.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* ========== SELOS E CHECKBOXES ========== */
.seals-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  background: var(--gradient-background);
  border-radius: 20px;
  border: 1px solid var(--medium-gray);
  backdrop-filter: blur(20px);
}

.seal-checkbox-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: var(--white);
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
}

.seal-checkbox-item:hover {
  transform: translateY(-8px) scale(1.05);
  border-color: var(--primary-yellow);
  box-shadow: var(--shadow-yellow);
}

.seal-checkbox-item input[type="checkbox"] {
  margin-bottom: 1rem;
  transform: scale(1.3);
  accent-color: var(--primary-blue);
}

.seal-checkbox-item img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 1rem;
  border-radius: 50%;
  border: 3px solid var(--primary-yellow);
  padding: 8px;
  background: var(--white);
}

.seal-checkbox-item span {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  color: var(--primary-blue-dark);
  line-height: 1.3;
}


/* ========== INTEGRANTES DA EQUIPE ========== */
.team-member-input {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: center;
}

.member-name-input,
.member-role-input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.member-name-input:focus,
.member-name-input:focus,
.member-role-input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.remove-member-btn {
  background-color: #dc3545;
  color: var(--white);
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

#add-member-btn {
  background-color: #28a745;
  color: var(--white);
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 1rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

#add-member-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ========== AÇÕES RÁPIDAS ========== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  background: var(--white);
  border-radius: 20px;
  text-decoration: none;
  transition: var(--transition-bounce);
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
}

.quick-action:hover {
  transform: translateY(-8px) scale(1.05);
  border-color: var(--primary-yellow);
  box-shadow: var(--shadow-yellow);
}

.quick-action-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: var(--gradient-blue);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
}

.quick-action-label {
  font-weight: 700;
  color: var(--primary-blue-dark);
  font-size: 1.1rem;
}

/* ========== FOOTER ========== */
.new-footer {
  background: var(--gradient-blue);
  color: var(--white);
  padding: 2rem 0;
  margin-top: 5rem;
}

.new-footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.new-footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  margin-left: 2rem;
  transition: var(--transition-smooth);
}

.new-footer-link:hover {
  color: var(--primary-yellow);
}

/* ========== ALERTAS ========== */
.alert {
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 16px;
  font-weight: 600;
  border: none;
}

.alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

.alert-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(21, 128, 61, 0.05) 100%);
  color: #14532d;
  border-left: 4px solid #22c55e;
}

/* ========== PÁGINA DE DETALHES ========== */
.detail-master-container {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.detail-header-card {
  background: var(--gradient-background);
  border-radius: 24px;
  padding: 3rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(59, 130, 246, 0.1);
  text-align: center;
  backdrop-filter: blur(20px);
}

.detail-title {
  font-size: 3rem;
  font-weight: 900;
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.detail-subtitle {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-medium);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 3rem;
}

.detail-main-content {
  background: var(--white);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--medium-gray);
}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--medium-gray);
  transition: var(--transition-smooth);
}

.sidebar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.sidebar-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-blue);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--primary-yellow);
}

.description-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-medium);
  white-space: pre-wrap;
}

/* ========== VÍDEO RESPONSIVO ========== */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 1024px) {
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    padding: 0 1rem;
    margin: 2rem auto;
  }

  .new-header-content {
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    align-items: center;
    justify-content: center;
  }

  .new-header-title {
    font-size: 1.5rem;
    text-align: center !important;
    width: 100%;
  }

  .detail-title {
    font-size: 2rem;
  }

  .detail-header-card {
    padding: 2rem;
  }

  .detail-main-content,
  .sidebar-card {
    padding: 1.5rem;
  }

  .seals-checkbox-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
  }

  .team-member-input {
    flex-direction: column;
    gap: 0.5rem;
  }

  .projects-table-container {
    overflow-x: auto;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .new-footer-content {
    flex-direction: column;
    text-align: center;
  }

  .new-footer-link {
    margin: 0 1rem;
  }
}

@media (max-width: 480px) {
  .dashboard-container > h1 {
    font-size: 2rem;
  }

  .stat-card {
    padding: 1.5rem;
  }

  .stat-card-value {
    font-size: 2rem;
  }

  .projects-table th,
  .projects-table td {
    padding: 1rem 0.5rem;
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .form-control {
    padding: 0.8rem;
  }
}

/* ========== ANIMAÇÕES ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.stat-card {
  animation: fadeInUp 0.6s ease-out;
}

.stat-card:nth-child(2) {
  animation-delay: 0.1s;
}

.stat-card:nth-child(3) {
  animation-delay: 0.2s;
}

/* ========== ESTADOS DE LOADING ========== */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-blue);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========== MELHORIAS ESPECÍFICAS ========== */
.text-muted {
  color: var(--dark-gray);
  font-style: italic;
}

.text-center {
  text-align: center;
}

.empty-table-cell {
    padding: 3rem;
    color: #6366f1;
}

.empty-table-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.empty-table-cell p {
    margin-top: 0.5rem;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.empty-state h3 {
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.empty-state p {
  color: var(--text-medium);
  font-size: 1.1rem;
}

/* ========== ACESSIBILIDADE ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus states para acessibilidade */
.btn:focus,
.form-control:focus,
.seal-checkbox-item:focus {
  outline: 2px solid var(--primary-yellow);
  outline-offset: 2px;
}

/* ========== IMPRESSÃO ========== */
@media print {
  .new-header,
  .new-footer,
  .btn,
  .quick-actions {
    display: none;
  }

  .dashboard-container {
    margin: 0;
    padding: 0;
  }

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

  * {
    box-shadow: none !important;
  }
}

.challenge-badge {
    background: linear-gradient(135deg, #dbeafe 0%, rgba(59, 130, 246, 0.1) 100%);
    padding: 4px 8px; border-radius: 8px; font-size: 0.875rem; color: #1e3a8a;
}
