/* ========= Base comum ========= */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

/* Estiliza o grupo como botões */
.radio-toggle {
  display: inline-flex;
  gap: 8px;
  margin: 12px 0;
}

.radio-toggle input[type="radio"] {
  display: none;
}

.radio-toggle label {
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #f1f1f1;
  color: #333;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.radio-toggle input[type="radio"]:checked + label {
  background: #007bff;
  border-color: #007bff;
  color: #fff;
}

/* Hover */
.radio-toggle label:hover {
  background: #e2e6ea;
}
.radio-toggle input[type="radio"]:checked + label:hover {
  background: #0056b3;
}


/* Dark mode (mesma classe do seu HTML: .dark) */

body.dark {
  font-family: Arial, sans-serif;
  background-color: #121212;
  color: #ddd;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

body.dark a {
color: #66b2ff;
}

/* ========= Página inicial (usa .sidebar no DOM) ========= */
body:has(.sidebar) {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Sidebar no modo escuro */
body.dark .sidebar {
  background-color: #1e2a38; /* tom escuro para combinar */
  height: 100vh;          /* ocupa a altura inteira da tela */
  overflow-y: auto;       /* ativa a rolagem vertical quando necessário */
  overflow-x: hidden;     /* evita barra de rolagem horizontal */

}
body.dark .sidebar a { color: #66b2ff; } /* links em azul claro */

body.dark .sidebar h2 { color: #fff; } /* titulos em branco */

body.dark .sidebar h3 { color: #fff; } /* titulos em branco */

body.dark .content img.logo {
  width: 320px;   /* mesma largura */
  height: auto;   /* altura proporcional */
  margin-bottom: 2px;
}

 body.dark .upload-container {
      width:100%;
      max-width:820px;
      background:#888;
      padding:20px;
      border-radius:8px;
      box-shadow:0 2px 8px rgba(0,0,0,0.08);
    }
	
 body.dark .upload-container a {
	color: #66b2ff;
	}

 body.dark .cpf-container {
      width:100%;
      max-width:820px;
      background:#888;
      padding:20px;
      border-radius:8px;
      box-shadow:0 2px 8px rgba(0,0,0,0.08);
    }


 body.dark .cpf-container a {
	color: #66b2ff;
	}
	
 body.dark .box {
	  background:#777;
 }
 
 body.dark .base64-output{
	color: #AAA;
	}
 
 body.dark .small-muted {
	 color: #000;
 }

    .upload-page-wrapper {
      display:flex;
      gap:20px;
      align-items:flex-start;
      padding:24px;
      justify-content:center;
    }
    .upload-container {
      width:100%;
      max-width:820px;
      background:#fff;
      padding:20px;
      border-radius:8px;
      box-shadow:0 2px 8px rgba(0,0,0,0.08);
    }
    .drop-zone {
      margin: 16px 0;
      padding: 30px;
      border: 2px dashed #888;
      border-radius: 8px;
      text-align: center;
      color: #555;
      cursor: pointer;
      transition: background 0.2s, border-color 0.2s;
    }
    .drop-zone.dragover {
      background: #eef6ff;
      border-color: #007bff;
      color: #007bff;
    }
    .upload-controls {
      display:flex;
      gap:12px;
      flex-wrap:wrap;
      align-items:center;
      margin-bottom:12px;
    }
    .file-info { margin-top:10px; color:#444; font-size:14px; }
    .base64-output {
      margin-top:14px;
      width:100%;
      min-height:180px;
      max-height:420px;
      overflow:auto;
      background:#f7f7f8;
      border:1px solid #e0e0e0;
      padding:12px;
      border-radius:6px;
      font-family:monospace;
      font-size:13px;
      white-space:pre-wrap;
      word-break:break-all;
    }
    .preview { margin-top:12px; display:flex; gap:12px; flex-wrap:wrap; }
    .preview img { max-width:240px; max-height:160px; border-radius:6px; border:1px solid #ddd; }
    .small-muted { color:#666; font-size:13px; }
    .controls-right { margin-left:auto; display:flex; gap:8px; }
    @media (max-width:820px){
      .upload-page-wrapper { padding:12px; }
      .upload-container { padding:14px; }
      .preview img { max-width:180px; max-height:140px; }
    }
	
.content img.logo {
    width: 200px;
    height: auto;
    margin-bottom: 2px;
}

/* Estilo geral blog */
   .blog-container {
      max-width: 900px;
      margin: 40px auto;
      background: #fff;
      padding: 20px;
      border-radius: 10px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    }

    .month-header {
      cursor: pointer;
      background: #f4f4f4;
      padding: 12px 18px;
      border-radius: 8px;
      font-weight: 600;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: background 0.3s;
    }

    .month-header:hover {
      background: #e8e8e8;
    }

    .month-posts {
      display: none;
      margin-bottom: 20px;
      padding-left: 8px;
      border-left: 3px solid #ccc;
    }

    .month-posts.active {
      display: block;
    }

    .post-card {
      background: #fafafa;
      padding: 16px;
      border-radius: 8px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.05);
      margin: 10px 0;
      transition: transform 0.2s;
    }

    .post-card:hover {
      transform: translateY(-3px);
    }

    .post-card h3 {
      margin: 0;
    }

    .post-card p {
      color: #555;
      font-size: 14px;
	  text-align: left;
    }

    .toggle-icon {
      font-size: 14px;
      transition: transform 0.3s;
    }

    .month-header.active .toggle-icon {
      transform: rotate(90deg);
    }

body.dark .blog-container {
      max-width: 900px;
      margin: 40px auto;
      background: #777;
      padding: 20px;
      border-radius: 10px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    }


body.dark .month-header {
      cursor: pointer;
      background: #f4f4f4;
      padding: 12px 18px;
      border-radius: 8px;
      font-weight: 600;
      margin-bottom: 8px;
	  color: #000;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: background 0.3s;
    }

/* Estilo geral do sidebar */
.sidebar {
  background: #e6f4ff;
  padding: 20px;
  width: 315px;
  min-height: 100vh;
  box-shadow: 2px 0 6px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
  transition: transform 0.3s ease;
  height: 100vh;          /* ocupa a altura inteira da tela */
  overflow-y: auto;       /* ativa a rolagem vertical quando necessário */
  overflow-x: hidden;     /* evita barra de rolagem horizontal */
}

.sidebar h3 {
  margin-top: 20px;
  font-size: 16px;
  font-weight: bold;
  color: #222;
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
}

.sidebar a {
  display: flex;
  align-items: center;
  padding: 10px;
  margin: 5px 0;
  color: #004aad;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.sidebar a:hover {
  background: #cce4ff;
  color: #000;
}

.sidebar a i {
  margin-right: 6px; /* ou 8px se quiser mais espaço */
}

.layout-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Layout principal */
main, footer {
  margin-left: 315px; /* espaço pro sidebar */
  padding: 10px;
  transition: margin-left 0.3s ease;
}

@media (max-width: 768px) {
  main, footer {
    margin-left: 0; /* em mobile, ocupa a tela toda */
  }
}

/* Conteúdo principal */
.content {
  flex: 1;
  padding: 32px;
  margin-left: 220px; /* reserva espaço pro sidebar */
  transition: margin-left 0.3s ease;
}


.cpf-page-wrapper {
  display: flex;
  justify-content: center;
  padding: 24px;
  width: 100%;
}

.cpf-container {
  max-width: 820px;
  width: 100%;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cpf-container h1, 
.cpf-container h2 {
  text-align: center;
  margin-bottom: 16px;
}

.cpf-container .menu {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
}


/* Esconde o input padrão */
input[type="file"] {
  display: none;
}

/* Botão estilizado */
.custom-file-label {
  display: inline-block;
  background: #007bff;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s;
}

.custom-file-label:hover {
  background: #0056b3;
}

.content img.logo {
  display: block;
  margin: 0 auto 10px auto; /* centraliza */
  max-width: 200px; /* limita tamanho */
  height: auto;
}


.post {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.post h2 {
  margin-top: 15px;
}

.share {
  margin-top: 15px;
  font-size: 14px;
  color: #555;
}

.share a {
  margin: 0 5px;
  color: #0066cc;
  text-decoration: none;
}

.share a:hover {
  text-decoration: underline;
}

.post-img {
  display: block;
  margin: 20px auto;
  max-width: 60%;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.post-img-thumb {
  display: block;
  margin: 20px auto;
  max-width: 40%;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.post {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.post h2 a {
  color: #0066cc;
  text-decoration: none;
}

.post h2 a:hover {
  text-decoration: underline;
}


/* Nome do arquivo */
#fileName {
  margin-left: 12px;
  font-size: 14px;
  color: #444;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile */
@media (max-width: 600px) {
  .upload-controls {
    flex-direction: column;
    align-items: stretch;
  }
  #fileName {
    margin: 8px 0 0;
    max-width: 100%;
    text-align: center;
  }
  .controls-right {
    justify-content: center;
  }
}



/* Responsividade - esconde sidebar em mobile */
/* Ocultar sidebar no mobile */
@media (max-width: 820px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.active {
    transform: translateX(0);
  }

  .content {
    flex: 1;
    width: 100%;
    margin-left: 0 !important; /* força ocupar a tela toda */
    padding: 16px;
  }

  .menu-toggle {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1100;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
  }
}


.content { flex: 1; padding: 40px; text-align: center; }
.content img.logo {
  width: 320px;
  height: auto;
  margin-bottom: 2px;
}
.content h1 { font-size: 28px; }
.content p {
  font-size: 16px;
  line-height: 1.6;
  max-width: 600px;
  margin: 10px auto;
}

footer {
  background-color: #eaeaea;
  padding: 15px;
  text-align: center;
  font-size: 13px;
  color: #555;
  transition: background 0.3s;
}
.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
}

.footer-left {
  text-align: left;
}

.footer-right {
  text-align: right;
}

.footer-links {
  margin: 10px 0;
  font-size: 14px;
}

.footer-links a {
  color: #0073e6;
  text-decoration: none;
  margin: 0 5px;
}

.footer-links a:hover {
  text-decoration: underline;
}

.favorites {
  margin-bottom: 10px;
}

.favorites button {
  background: #0073e6;
  color: #fff;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease-in-out;
}

.favorites button:hover {
  background: #005bb5;
}

.copy {
  font-size: 12px;
  color: #777;
}

@media (max-width: 600px) {
  /* Ajustar botões para largura total */
  .menu button,
  .box button {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 8px;
    border-radius: 6px;
  }

  /* Ajustar inputs */
  .box .inline {
    flex-direction: column;
    gap: 10px;
  }

  .box input[type="text"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
  }

  /* Espaçamento maior entre blocos */
  .box {
    padding: 14px;
  }

  .radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .radio-option span {
    font-size: 15px;
  }
}


/* Responsividade */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-left, .footer-right {
    text-align: center;
  }
}

.copy {
  font-size: 12px;
  color: #777;
  margin-top: 10px;
}


body.dark footer { background-color: #1e1e1e; color: #aaa; }

.social-icons a {
  margin: 0 8px;
  color: inherit;
  text-decoration: none;
  font-size: 20px;
}

.toggle-darkmode {
  position: fixed;
  top: 10px;
  right: 10px;
  padding: 8px 12px;
  background: #1e88e5;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* ========= Página de validação (usa .wrapper no DOM) ========= */
/* Mantém exatamente o estilo original do arquivo de validação */
.radio-group {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
  flex-wrap: wrap;
}
.radio-option {
  background: #DDD;
  border: 2px solid #DDD;
  border-radius: 8px;
  padding: 8px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  color: #f4f6f9;
  display: flex;
  align-items: center;
  gap: 8px;
}
.radio-option input { display: none; }
.radio-option span { font-size: 14px; }
.radio-option:hover {
  background: #00DDff;
  border: 2px solid #00DDff;
  color: #000;
}
.radio-option:has(input:checked) {
  background: #0077ff;
  border: 2px solid #0077ff;
  color: #fff;
}

/* No original o body desse arquivo é flex e centraliza o .wrapper.
   Aqui usamos :has para aplicar somente quando houver .wrapper. */
body:has(.wrapper) {
  display: flex;
  justify-content: center;
}

.wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin-top: 20px;
}

.container img.logo {
  width: 200px;
  height: auto;
  margin-bottom: 0px;
}

.container {
  width: 100%;
  max-width: 700px;
  padding: 20px;
}

.ads-vertical { width: 160px; min-height: 600px; }

.container h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.menu {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.menu button {
  flex: 1;
  padding: 12px;
  margin: 0 5px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: 0.3s;
}
.menu button.active { background-color: #007bff; color: white; }
.menu button.inactive { background-color: #e9ecef; color: #333; }

.box {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

label { font-weight: bold; display: block; margin-bottom: 8px; }

input {
  width: calc(100% - 100px);
  padding: 10px;
  margin-right: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
}

button {
  padding: 10px 15px;
  border: none;
  background-color: #007bff;
  color: white;
  font-size: 14px;
  border-radius: 5px;
  cursor: pointer;
}
button:hover { background-color: #0056b3; }

.inline { display: flex; align-items: center; }

.result {
  text-align: center;
  margin-top: 15px;
  font-size: 16px;
}
.valid { color: green; font-weight: bold; }
.invalid { color: red; font-weight: bold; }

.generated {
  font-size: 18px;
  font-weight: bold;
  margin-top: 10px;
  color: #333;
}

.options {
  margin-top: 10px;
  display: flex;
  gap: 15px;
  justify-content: center;
}

.ads-horizontal { margin: 20px auto; text-align: center; }


.options-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
}

.switch-label input {
  display: none;
}

.switch {
  width: 40px;
  height: 20px;
  background: #ccc;
  border-radius: 20px;
  position: relative;
  transition: background 0.3s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

.switch-label input:checked + .switch {
  background: #007bff;
}

.switch-label input:checked + .switch::after {
  transform: translateX(20px);
}

.label-text {
  color: #333;
}
