      * {
          margin: 0;
          padding: 0;
          box-sizing: border-box;
      }

      body {
          font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
          background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
          min-height: 100vh;
          padding: 20px;
      }

      .container {
          max-width: 900px;
          margin: 0 auto;
          background: white;
          border-radius: 20px;
          padding: 40px;
          box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
      }

      .logo {
          text-align: center;
          margin-bottom: 20px;
      }

      h1 {
          color: #1e3c72;
          text-align: center;
          margin-bottom: 10px;
          font-size: 28px;
      }

      .subtitle {
          text-align: center;
          color: #666;
          margin-bottom: 30px;
          font-size: 14px;
      }

      .tab-buttons {
          display: flex;
          gap: 10px;
          margin-bottom: 30px;
      }

      .tab-btn {
          flex: 1;
          padding: 15px;
          border: none;
          background: #f0f0f0;
          color: #666;
          font-size: 16px;
          font-weight: 600;
          border-radius: 10px;
          cursor: pointer;
          transition: all 0.3s;
      }

      .tab-btn.active {
          background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
          color: white;
      }

      .tab-btn:disabled {
          opacity: 0.3;
          cursor: not-allowed;
      }

      .tab-content {
          display: none;
      }

      .tab-content.active {
          display: block;
      }

      .form-group {
          margin-bottom: 20px;
          padding-bottom: 15px;
          border-bottom: 1px solid #ccc;
      }

      .form-group:last-child {
          border-bottom: none;
      }

      .form-group div {
          margin-top: 5px;
          margin-left: 50px;
          margin-bottom: -10px;
      }


      label {
          display: block;
          margin-bottom: 8px;
          color: #333;
          font-weight: 600;
      }



      input,
      textarea {
          width: 100%;
          padding: 12px;
          border: 2px solid #e0e0e0;
          border-radius: 8px;
          font-size: 16px;
          transition: border-color 0.3s;
      }

      input:focus,
      textarea:focus {
          outline: none;
          border-color: #2a5298;
      }

      textarea {
          resize: vertical;
          min-height: 80px;
      }

      button {
          width: 100%;
          padding: 15px;
          background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
          color: white;
          border: none;
          border-radius: 10px;
          font-size: 18px;
          font-weight: 600;
          cursor: pointer;
          transition: transform 0.2s;
      }

      .btn-relatorio {
          width: auto;
          padding: 15px 15px;
          font-size: 14px;
          border-radius: 8px;
          display: inline-block;
      }

      #relatorio-tab button {
          margin-right: 10px;
      }

      button:hover {
          transform: translateY(-2px);
      }

      button:active {
          transform: translateY(0);
      }

      button:disabled {
          opacity: 0.6;
          cursor: not-allowed;
      }

      .btn-secondary {
          background: #6c757d;
          margin-top: 10px;
      }

      input,
      textarea,
      select {
          width: 100%;
          padding: 12px;
          border: 2px solid #e0e0e0;
          border-radius: 8px;
          font-size: 16px;
          transition: border-color 0.3s;
          background-color: white;
      }

      input:focus,
      textarea:focus,
      select:focus {
          outline: none;
          border-color: #2a5298;
      }

      #qrcode {
          display: flex;
          justify-content: center;
          margin: 30px 0;
          padding: 20px;
          background: #f9f9f9;
          border-radius: 10px;
      }

      .qr-info {
          background: #e3f2fd;
          padding: 15px;
          border-radius: 8px;
          margin-top: 20px;
          border-left: 4px solid #2a5298;
      }

      .qr-info p {
          margin: 5px 0;
          color: #333;
      }

      .success-message {
          background: #d4edda;
          color: #155724;
          padding: 15px;
          border-radius: 8px;
          margin-top: 20px;
          border-left: 4px solid #28a745;
          display: none;
      }

      .error-message {
          background: #f8d7da;
          color: #721c24;
          padding: 15px;
          border-radius: 8px;
          margin-top: 20px;
          border-left: 4px solid #dc3545;
          display: none;
      }

      .loading {
          display: none;
          text-align: center;
          padding: 20px;
      }

      .spinner {
          border: 4px solid #f3f3f3;
          border-top: 4px solid #2a5298;
          border-radius: 50%;
          width: 40px;
          height: 40px;
          animation: spin 1s linear infinite;
          margin: 0 auto;
      }

      @keyframes spin {
          0% {
              transform: rotate(0deg);
          }

          100% {
              transform: rotate(360deg);
          }
      }

      .info-box {
          background: #fff3cd;
          padding: 15px;
          border-radius: 8px;
          margin-bottom: 20px;
          border-left: 4px solid #ffc107;
      }

      .info-box p {
          color: #856404;
          font-size: 14px;
          margin: 5px 0;
      }

      #qrcode canvas,
      #qrcode img {
          border-radius: 10px;
      }

      .required {
          color: #dc3545;
      }

      .user-info {
          background: #e8f5e9;
          padding: 15px;
          border-radius: 8px;
          margin-bottom: 20px;
          border-left: 4px solid #4caf50;
      }

      .user-info p {
          color: #2e7d32;
          margin: 5px 0;
      }

      .login-container {
          max-width: 400px;
      }

      .welcome-text {
          text-align: center;
          color: #666;
          margin-bottom: 30px;
          line-height: 1.6;
      }

      /*filtro dashboard*/

      .filtros-dashboard {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filtros-dashboard select {
    min-width: 200px;
    height: 80px;
}

.filtros-dashboard input {
    height: 35px;
    padding: 5px;
}

.filtro-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.flag-filtro {
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
    background: #e5e7eb;
}

.flag-filtro:hover {
    transform: scale(1.05);
}

.flag-filtro.ativo {
    background: #2563eb;
    color: white;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.kpi-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: 0.2s;
}

.kpi-card:hover {
    transform: translateY(-3px);
}

.kpi-card h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #6b7280;
}

.kpi-card p {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    color: #111827;
align-items: center;}

.dashboard-topo{
    margin-bottom: 20px;
}



.dashboard-linha-datas{

    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: nowrap;
}

.filtro-box{
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filtro-box label{
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.filtro-box.pequeno input{

    height: 46px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: 0.2s;
}

.filtro-box.pequeno input:focus{

    border-color: #2563eb;
    background: #fff;
    box-shadow:
        0 0 0 3px rgba(37,99,235,0.15);
}



#btn-atualizar-dashboard{
    height: 36px;
    padding: 0 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 23px;
    font-size: 13px;
    font-weight: 600;
}

.conteudos-grid{

    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(170px, 1fr));

    gap: 10px;

    width: 100%;
}

.conteudo-item{

    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 12px;
    min-height: 52px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    transition: 0.2s;
    cursor: pointer;
}

.conteudo-item:hover{

    background: #eff6ff;
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.conteudo-item input{

    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
}



.kpi-card span{
    font-size: 13px;
    color: #666;
}

.kpi-card h2{
    margin-top: 8px;
    font-size: 28px;
}

.perguntas-grid{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.perguntas-grid .card{
    padding: 15px;
}

.perguntas-grid canvas{
    width: 100% !important;
    height: 280px !important;
    max-height: 280px !important;
}

.card{
    page-break-inside: avoid;
    break-inside: avoid;
}

canvas{
    max-width: 100%;
}

.legenda-custom{
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.legenda-item{
    flex: 1;
    min-width: 120px;
}

.legenda-titulo{
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.legenda-cor{
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.legenda-unidades{
    font-size: 12px;
    color: #555;
    line-height: 1.5;
}

.info-respostas{
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.5;
}

.info-respostas div{
    margin-bottom: 10px;
}

.info-respostas strong{
    display: block;
    margin-bottom: 4px;
}

/*botao exportaar*/

#btn-exportar-pdf{

    min-width: 160px;
    height: 38px;
    width: 400px;
    padding: 0 18px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    background: linear-gradient(
        135deg,
        #dc2626 0%,
        #b91c1c 100%
    );

    color: white;
    transition: 0.2s;
}

#btn-exportar-pdf:hover{
    transform: translateY(-2px);
}

/* LINHA DOS FILTROS */

/* ===== DASHBOARD FILTROS ===== */

.dashboard-filtros{
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;

    background: #fff;
    padding: 18px;
    border-radius: 14px;
}

/* CONTEÚDOS */

.filtro-box:first-child{
    flex: 1 1 100%;
}

/* GRID DOS CONTEÚDOS */

#conteudos-checkbox{
    width: 100%;
}

/* DATAS */

.filtro-box.pequeno{
    width: 180px;
    min-width: 180px;
}

/* INPUTS */

.filtro-box.pequeno input{
    height: 46px;
}

/* BOTÕES */

#btn-atualizar-dashboard,
#btn-exportar-pdf{

    width: auto;
    min-width: 180px;
    height: 46px;

    margin-top: 0;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* ORGANIZA LINHA DE BAIXO */

.dashboard-linha-datas{
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    width: 100%;
}