:root {
    --primary-color: #0072bc;
    --accent-color: #ff8c00;
    --bg-color: #f4f6f9;
    --card-bg: #ffffff;
    --text-color: #333333;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Layout da Aplicação */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Menu Lateral (Sidebar) */
.sidebar {
    width: 240px;
    background-color: var(--primary-color);
    color: #fff;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar h2 {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 10px;
}

.sidebar button {
    background: none;
    border: 1px solid transparent;
    color: white;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: background 0.3s;
}

.sidebar button:hover, .sidebar button.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

/* Área Principal */
.main-content {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
}

.card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

/* Fluxo Visual de Etapas */
.steps-container {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    position: relative;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    position: relative;
}

.step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 10px;
    border: 3px solid var(--accent-color);
}

.step-title {
    font-size: 0.85rem;
    font-weight: bold;
}

/* Formulários e Componentes */
.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9rem;
}

.form-group input, .form-group select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.btn-action {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-action:hover {
    background-color: #e07b00;
}

.view-section {
    display: none;
}

.view-section.active {
    display: block;
}

/* Dashboard Admin */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.metric-card {
    background: #f0f4f8;
    border-left: 5px solid var(--accent-color);
    padding: 15px;
    border-radius: 4px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container img {
    width: 162px;
    height: 55px;
    object-fit: contain;
}

/* Esconde o botão hambúrguer no Desktop */
.hamburger-btn {
  display: none;
}

/* ==========================================================================
   MENU HAMBÚRGUER - MOBILE (Telas até 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
  
  .app-container {
    flex-direction: column !important;
    width: 100% !important;
  }

  .sidebar {
    width: 100% !important;
    padding: 10px 15px !important;
    box-sizing: border-box !important;
    position: relative !important;
  }

  /* Cabeçalho da Sidebar no Mobile (Logo + Botão Hambúrguer lado a lado) */
  .sidebar-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
  }

  /* Estilização do Botão Hambúrguer */
  .hamburger-btn {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: 30px !important;
    height: 22px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
  }

  .hamburger-btn span {
    width: 100% !important;
    height: 3px !important;
    background-color: #333 !important; /* Cor do ícone */
    border-radius: 2px !important;
    transition: all 0.3s ease !important;
  }

  /* Esconde o menu de botões por padrão no mobile */
  .sidebar-menu {
    display: none !important;
    flex-direction: column !important;
    width: 100% !important;
    margin-top: 15px !important;
  }

  /* Exibe o menu quando ativado pelo JavaScript */
  .sidebar-menu.show {
    display: flex !important;
  }

  .sidebar-menu button {
    width: 100% !important;
    margin: 4px 0 !important;
    padding: 12px !important;
    text-align: left !important;
  }

  /* Ajustes gerais de layout no mobile */
  .main-content {
    width: 100% !important;
    padding: 15px 10px !important;
    box-sizing: border-box !important;
  }

  .steps-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .metrics-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}

/* ==========================================================================
   Accordion / Relação de Documentos Moderno
   ========================================================================== */
.section-desc {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.doc-group {
    margin-bottom: 25px;
}

.doc-group-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f3c88; /* Azul principal do sistema */
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 6px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    background: #fff;
    transition: all 0.2s ease;
}

.accordion-item:hover {
    border-color: #cbd5e1;
}

.accordion-header {
    width: 100%;
    padding: 14px 18px;
    background: #f8fafc;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.accordion-header:hover {
    background: #f1f5f9;
    color: #1f3c88;
}

.accordion-header .icon {
    font-size: 1.3rem;
    font-weight: bold;
    color: #64748b;
    transition: transform 0.3s ease;
}

/* Quando expandido */
.accordion-item.active .accordion-header {
    background: #edf2f7;
    color: #1f3c88;
}

.accordion-item.active .accordion-header .icon {
    transform: rotate(45deg); /* Transforma o + em x */
    color: #1f3c88;
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 18px;
    background: #ffffff;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
}

.accordion-item.active .accordion-body {
    max-height: 1000px; /* Permite expansão fluida */
    padding: 15px 18px;
}

.accordion-body ul {
    padding-left: 20px;
    margin: 8px 0;
}

.accordion-body ul li {
    margin-bottom: 6px;
}

.two-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 6px;
}
  
.alert-box {
    background-color: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 10px 14px;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #92400e;
}
  
.doc-images {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
  
.doc-images img {
    max-height: 50px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* --- ESTILOS DO MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none; /* Inicia oculto */
    justify-content: center;
    align-items: flex-start;
    z-index: 9999;
    overflow-y: auto;
    padding: 40px 0;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    padding: 30px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    margin: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-modal:hover {
    color: #000;
}

.relacao_documentos {
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.relacao_documentos h3 {
    color: #4682B4;
    margin-top: 0;
}

.relacao_documentos .input-read {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    font-weight: bold;
    box-sizing: border-box;
}

.footer {
    margin-top: 30px;
    padding: 10px 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #fff;
    background: #2b2b2b;
    border-radius: 4px;
}

/* Força a área de conteúdo e o card a ocuparem a largura total */
.main-content {
    width: 100% !important;
    max-width: 100% !important;
}

.status-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* footer */
.footer-floating {
    position: fixed;
    bottom: 15px;
    right: 20px;
    background: #ffffff;
    padding: 8px 18px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    border: 1px solid #e2e8f0;
    z-index: 999;
    display: flex;
    align-items: center;
}

/* Container Geral */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
  }
  
  /* Estilo Base dos Cards */
  .card-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }
  
  .card-header h1,
  .card-header h2 {
    font-size: 1.35rem;
    color: #0f172a;
    margin: 0 0 6px 0;
    font-weight: 700;
  }
  
  .card-header p {
    color: #64748b;
    font-size: 0.92rem;
    margin: 0 0 24px 0;
  }
  
  .card-header.center {
    text-align: center;
  }
  
  /* Passos / Steps */
  .steps-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
  }
  
  .steps-mini {
    justify-content: center;
    gap: 40px;
    margin-bottom: 32px;
  }
  
  .step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 110px;
  }
  
  .step-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #0072bc;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border: 2px solid #ff8c00;
  }
  
  .step-icon.step-blue {
    background-color: #e0f2fe;
    color: #0284c7;
    border-color: #38bdf8;
  }
  
  .step-title {
    font-size: 0.85rem;
    color: #334155;
    font-weight: 600;
    line-height: 1.3;
  }
  
  /* Banner CTA (Simulador CAIXA) */
  .cta-banner {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 12px;
  }
  
  .cta-info h3 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    color: #0f172a;
  }
  
  .cta-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
  }
  
  .btn-action {
    background-color: #f97316; /* Laranja da CAIXA/Corresponde */
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.1s ease;
  }
  
  .btn-action:hover {
    background-color: #ea580c;
    transform: translateY(-1px);
  }
  
  /* Grid de Recursos (2x2 no desktop) */
  .features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .feature-card {
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
  }
  
  .feature-icon {
    font-size: 1.6rem;
    background: #ffffff;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }
  
  .feature-card h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    color: #0f172a;
  }
  
  .feature-card p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
  }
  
  /* --- Ajustes de Responsividade para Mobile --- */
@media (max-width: 768px) {
    .cta-banner {
      flex-direction: column;
      text-align: center;
    }
    
    .features-grid {
      grid-template-columns: 1fr;
    }
  
    /* Correção do desalinhamento das etapas */
    .steps-container {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 20px 12px;
      align-items: start; /* Alinha o topo de todos os itens da linha */
      justify-items: center;
    }
  
    .steps-mini {
      grid-template-columns: repeat(3, 1fr);
    }
  
    .step-item {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
    }
  
    .step-icon {
      flex-shrink: 0; /* Impede a bolinha de achatar ou deformar */
      margin-bottom: 8px;
    }
  
    .step-title {
      font-size: 0.75rem; /* Ajusta a fonte para caber melhor no celular */
      line-height: 1.2;
    }
  }
  
  /* Telas de Celulares Pequenos (Ex: iPhone SE / Androids menores) */
  @media (max-width: 480px) {
    .steps-container {
      grid-template-columns: repeat(2, 1fr); /* 2 colunas para não espremer os textos */
    }
  
    .steps-mini {
      grid-template-columns: 1fr; /* Lista vertical para as 3 etapas automáticas */
      gap: 16px;
    }
  
    .steps-mini .step-item {
      flex-direction: row; /* Fica estilo lista: bolinha à esquerda, texto à direita */
      text-align: left;
      background-color: #f8fafc;
      padding: 12px 16px;
      border-radius: 8px;
      border: 1px solid #e2e8f0;
    }
  
    .steps-mini .step-icon {
      margin-bottom: 0;
      margin-right: 14px;
    }
  }