/* ============================================================
   RECYCLEWAY - DESIGN SYSTEM
   Baseado no design premium do Recycle Ways
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* Cores Principais */
  --color-forest-deep: #062c21;
  --color-forest-accent: #059669;
  --color-impact-green: #10b981;
  --color-impact-amber: #f59e0b;
  --color-bg-light: #f8fafc;
  --color-white: #ffffff;
  --color-slate-200: #e2e8f0;
  --color-text-main: #334155;
  --color-text-headings: #0f172a;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  --color-success: #10b981;
  
  /* Dimensões */
  --container-width: 1100px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 20px rgba(0,0,0,0.05);
  --transition-smooth: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--color-bg-light);
  color: var(--color-text-main);
  line-height: 1.6;
  padding-top: 70px;
}

/* ============================================================
   TIPOGRAFIA
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  color: var(--color-text-headings);
}

h1 { font-size: 2.5rem; font-weight: 800; }
h2 { 
  font-size: 1.8rem; 
  font-weight: 700; 
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
h2::before {
  content: '';
  width: 6px;
  height: 28px;
  background: var(--color-impact-green);
  border-radius: 10px;
  flex-shrink: 0;
}
h3 { font-size: 1.3rem; font-weight: 700; }

a { text-decoration: none; color: var(--color-impact-green); }
a:hover { color: var(--color-forest-accent); }

/* Badge de notificações */
.badge-notificacao {
  background: var(--color-danger);
  color: white;
  border-radius: 50%;
  padding: 1px 7px;
  font-size: 10px;
  margin-left: 2px;
  display: inline-block;
}

/* Badge de pendências em botões (novidades / validações) */
.btn-badge {
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
  line-height: 1.4;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.4);
}
.btn-badge.btn-badge-amber {
  background: #f59e0b;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.4);
}

/* Hamburger */
.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--color-forest-deep);
  padding: 0.3rem;
}

/* ============================================================
   RESPONSIVIDADE DA NAVEGAÇÃO
   ============================================================ */

@media (max-width: 1100px) {
  .nav-menu {
    gap: 0.4rem;
  }
  
  .nav-menu a {
    font-size: 0.72rem;
    padding: 0.2rem 0.4rem;
  }
}

@media (max-width: 992px) {
  .nav-menu {
    gap: 0.3rem;
  }
  
  .nav-menu a {
    font-size: 0.68rem;
    padding: 0.2rem 0.3rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  
  .hamburger {
    display: block;
  }
  
  nav {
    height: 58px;
  }
}

/* Badge de notificações */
.badge-notificacao {
  background: var(--color-danger);
  color: white;
  border-radius: 50%;
  padding: 2px 8px;
  font-size: 11px;
  margin-left: 4px;
  display: inline-block;
}

/* Hamburger */
.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-forest-deep);
}

/* Sidebar Mobile */
.sidebar {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: var(--color-forest-deep);
  z-index: 2000;
  padding: 2rem 1.5rem;
  transition: right 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}

.sidebar.active { right: 0; }

.sidebar .close-sidebar {
  align-self: flex-end;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  background: none;
  border: none;
}

.sidebar a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition-smooth);
}

.sidebar a:hover {
  color: white;
  padding-left: 8px;
}

.sidebar .sidebar-divider {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 0.5rem 0;
}

.sidebar .btn {
  background: var(--color-impact-green);
  color: white !important;
  text-align: center;
  padding: 0.8rem;
  border-radius: 8px;
  border: none;
  margin-top: 0.5rem;
}

/* ============================================================
   BLOCOS DE CONTEÚDO
   ============================================================ */

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-block {
  max-width: var(--container-width);
  margin: 2.5rem auto;
  padding: 2.5rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-slate-200);
}

/* ============================================================
   BOTÕES
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: var(--color-forest-deep);
  color: #ffffff !important;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.btn:hover {
  background: var(--color-forest-accent);
  transform: translateY(-2px);
  color: white !important;
}

.btn-primary { background: var(--color-impact-green); }
.btn-primary:hover { background: var(--color-forest-accent); }

.btn-danger { background: var(--color-danger); }
.btn-danger:hover { background: #dc2626; }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.75rem; }

.btn-pdf {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  transition: var(--transition-smooth);
}

.btn-pdf:hover { opacity: 0.85; transform: translateY(-2px); color: #fff; }

/* ============================================================
   TABELAS
   ============================================================ */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 2px solid var(--color-forest-deep);
  border-radius: 8px;
  margin: 1rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

table thead {
  background: var(--color-forest-deep);
  color: white;
}

table thead th {
  padding: 1rem 1.2rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

table tbody td {
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--color-slate-200);
}

table tbody tr:hover {
  background: rgba(16, 185, 129, 0.04);
}

table tfoot {
  background: #f0fdf4;
  font-weight: 700;
}

table tfoot td {
  padding: 0.8rem 1.2rem;
  border-top: 2px solid var(--color-forest-deep);
}

/* ============================================================
   FORMULÁRIOS
   ============================================================ */

.form-group { margin-bottom: 1.5rem; }

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--color-text-headings);
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-slate-200);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  background: var(--color-white);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-impact-green);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.form-control:disabled {
  background: var(--color-bg-light);
  cursor: not-allowed;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23334155' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--color-bg-light);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-slate-200);
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.card-img {
  height: 180px;
  background-size: cover;
  background-position: center;
}

.card-content { padding: 1.5rem; }

.card-content h3 { margin-bottom: 0.5rem; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */

.progress-bar {
  background: var(--color-slate-200);
  height: 8px;
  border-radius: 10px;
  margin: 0.8rem 0;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, var(--color-impact-green), #34d399);
  height: 100%;
  border-radius: 10px;
  transition: width 1s ease;
}

/* ============================================================
   STATS / METRICAS
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-box {
  background: var(--color-bg-light);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  border-bottom: 4px solid var(--color-impact-green);
}

.stat-box strong {
  display: block;
  font-size: 2rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  color: var(--color-forest-deep);
}

.stat-box p {
  color: var(--color-text-main);
  font-size: 0.9rem;
  margin: 0;
}

/* ============================================================
   FLASH MESSAGES
   ============================================================ */

.flash-sucesso {
  background: #d4edda;
  color: #155724;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #c3e6cb;
  margin: 1rem 0;
}

.flash-erro {
  background: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #f5c6cb;
  margin: 1rem 0;
}

.flash-aviso {
  background: #fff3cd;
  color: #856404;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #ffeeba;
  margin: 1rem 0;
}

/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-pendente { background: #fff3cd; color: #856404; }
.badge-aprovado { background: #d4edda; color: #155724; }
.badge-rejeitado { background: #f8d7da; color: #721c24; }

/* ============================================================
   ANIMAÇÕES
   ============================================================ */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeInUp 0.6s ease forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

@media (max-width: 1024px) {
  .section-block { padding: 2rem; margin: 2rem 1rem; }
}

@media (max-width: 768px) {
  body { padding-top: 60px; }
  
  .nav-menu { display: none; }
  .hamburger { display: block; }
  
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  h2::before { height: 20px; }
  
  .section-block { padding: 1.5rem; margin: 1.5rem 0.8rem; }
  
  .table-responsive { border-width: 1px; }
  table thead th, table tbody td { padding: 0.6rem 0.8rem; font-size: 0.8rem; }
  
  .btn { font-size: 0.8rem; padding: 0.6rem 1.2rem; }
  .btn-pdf { font-size: 0.7rem; padding: 0.4rem 1rem; }
  
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .stat-box strong { font-size: 1.5rem; }
  
  .cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .container { padding: 0 0.8rem; }
  .section-block { padding: 1rem; }
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero-section {
    background: var(--color-forest-deep);
    padding: 6rem 0;
    margin-top: 0;
    position: relative;
    color: white;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 44, 33, 0.85);
    z-index: 1;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

.hero-container h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: white;
}

.hero-container p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white !important;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-2px);
}

/* ============================================================
   PROJECTS GRID
   ============================================================ */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--color-bg-light);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-slate-200);
    transition: var(--transition-smooth);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.card-img {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.card-content p {
    font-size: 0.9rem;
    color: var(--color-text-main);
    margin-bottom: 1rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

@media (max-width: 768px) {
    .hero-container h1 {
        font-size: 2.2rem;
    }
    
    .hero-container p {
        font-size: 1rem;
    }
    
    .hero-section {
        padding: 4rem 0;
        min-height: 300px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-container h1 {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}
html, body {
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    /* Evita que o conteúdo fique cortado em telas pequenas */
    overflow-x: hidden;
    overflow-y: auto;
}

/* Footer sempre no fim do conteúdo, nunca empurrado pra fora */
footer {
    width: 100%;
    flex-shrink: 0;
}