﻿/* WhatsApp Floating Button */
    .whatsapp-float {
      position: fixed;
      width: 60px;
      height: 60px;
      bottom: 20px;
      left: 20px;  /* Mudado de right para left */
      background-color: #25d366;
      color: white;
      border-radius: 50px;
      text-align: center;
      font-size: 30px;
      box-shadow: 2px 2px 3px #999;
      z-index: 1000;
      animation: pulse 1.5s infinite;
      display: flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      transition: all 0.3s ease;
    }
    
    .whatsapp-float:hover {
      background-color: #20b356;
      transform: scale(1.1);
    }
    
    @keyframes pulse {
      0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
      70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
      100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
    }
    
    @media (max-width: 768px) {
      .whatsapp-float {
        display: none !important;
      }
    }
    
    /* Barra inferior mobile com WhatsApp */
    .footer-bottom-bar {
      display: none;
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      background: #fff;
      border-top: 1px solid #e2e8f0;
      padding: 8px 0;
      z-index: 100;
      justify-content: center;
      align-items: center;
      box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    }
    
    .whatsapp-float-mobile {
      background-color: #25d366;
      color: white;
      border-radius: 50%;
      width: 46px;
      height: 46px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 26px;
      box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      text-decoration: none;
      transition: all 0.3s ease;
    }
    
    .whatsapp-float-mobile:hover {
      background-color: #20b356;
      transform: scale(1.05);
    }
    
    @media (max-width: 768px) {
      .footer-bottom-bar {
        display: flex !important;
      }
      
      /* Adiciona espaço no final da sidebar para não ser coberto pela barra */
      .sidebar {
        padding-bottom: 70px !important;
      }
      
      /* Adiciona espaço no body para conteúdo não ser coberto */
      body {
        padding-bottom: 60px;
      }
    }
    
    @media (min-width: 769px) {
      .footer-bottom-bar {
        display: none !important;
      }
    }
    
    body.dark-mode .footer-bottom-bar {
      background: var(--panel2);
      border-top: 1px solid var(--border);
    }
    
    /* Reset e Variáveis */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    :root {
      --background: #ffffff;
      --panel1: #f8f9fa;
      --panel2: #ffffff;
      --text: #1a202c;
      --muted: #64748b;
      --border: #e2e8f0;
      --brand: #4f8cff;
    }

    /* Dark Mode Variables */
    body.dark-mode {
      --background: #181a1b;
      --panel1: #23272a;
      --panel2: #202225;
      --text: #f1f1f1;
      --muted: #a0aec0;
      --border: #2d3748;
      --brand: #4f8cff;
      background: var(--background);
      color: var(--text);
    }

    body.dark-mode header {
      background: var(--panel2);
      border-bottom: 1px solid var(--border);
      color: var(--text);
    }

    body.dark-mode .sidebar {
      background: var(--panel2);
      border-right: 1px solid var(--border);
      color: var(--text);
    }

    body.dark-mode .container-main {
      background: var(--background);
      color: var(--text);
    }

    body.dark-mode .feature-card {
      background: var(--panel1);
      color: var(--text);
      border: 1px solid var(--border);
    }

    body.dark-mode .search-box input {
      background: var(--panel1);
      color: var(--text);
      border: 1px solid var(--border);
    }

    body.dark-mode .search-box input::placeholder {
      color: var(--muted);
    }

    body.dark-mode .theme-toggle {
      background: var(--panel1);
      color: var(--text);
      border: 1px solid var(--border);
    }

    body.dark-mode #langSelect {
      background: var(--panel1);
      color: var(--text);
      border: 1px solid var(--border);
    }

    body.dark-mode .modal-content {
      background: var(--panel2);
      color: var(--text);
      border: 1px solid var(--border);
    }

    body.dark-mode .modal {
      background: rgba(24,26,27,0.85);
    }

    /* Improve theme-toggle button visibility */
    .theme-toggle {
      transition: background 0.2s, color 0.2s;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
      background: var(--background);
      color: var(--text);
      line-height: 1.6;
    }

    /* Header */
    header {
      background: var(--panel2);
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 0;
      z-index: 100;
      box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .wrap.topbar {
      max-width: 1400px;
      margin: 0 auto;
      padding: 12px 16px;
      display: flex;
      align-items: center;
      gap: 16px;
      justify-content: center;
    }

    .wrap {
      max-width: 1400px;
      margin: 0 auto;
      padding: 0 16px;
    }

    .menu-toggle {
      display: none;
      flex-direction: column;
      gap: 4px;
      border: none;
      background: transparent;
      cursor: pointer;
      padding: 8px;
      border-radius: 4px;
      transition: background-color 0.2s;
      min-width: 40px;
      min-height: 40px;
      justify-content: center;
      align-items: center;
    }

    .menu-toggle:hover {
      background: var(--border);
    }

    .menu-bar {
      width: 24px;
      height: 3px;
      background: var(--text);
      border-radius: 2px;
      transition: all 0.3s;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 8px;
      text-decoration: none;
      color: var(--brand);
      font-weight: 700;
      font-size: 1.1em;
      flex-shrink: 0;
    }

    .logo img {
      height: 36px;
      width: 36px;
      object-fit: contain;
    }

    .search-container {
      flex: 0 1 600px;
      max-width: 600px;
      display: flex;
      justify-content: center;
    }

    .search-box {
      position: relative;
    }

    .search-box input {
      width: 100%;
      padding: 8px 36px 8px 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 14px;
    }

    .search-icon {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
    }

    .header-controls {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .theme-toggle {
      padding: 8px 16px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--panel2);
      color: var(--text);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 14px;
      white-space: nowrap;
      height: 38px;
      vertical-align: middle;
      line-height: normal;
    }

    #langSelect {
      padding: 8px 16px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel2);
      color: var(--text);
      font-size: 14px;
      height: 38px;
      vertical-align: middle;
      display: flex;
      align-items: center;
    }

    /* Layout Principal */
    .container-main {
      max-width: 1400px;
      margin: 0 auto;
      display: flex;
      position: relative;
      padding: 0 16px;
    }

    /* Sidebar */
    .sidebar {
      width: 250px;
      background: var(--panel2);
      border-right: 1px solid var(--border);
      padding: 12px 8px;
      height: calc(100vh - 65px);
      overflow-y: auto;
      position: sticky;
      top: 65px;
      flex-shrink: 0;
      margin-left: -16px;
    }

    .sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
    }

    .nav-section {
  margin-bottom: -16px;
}

@media (max-width: 700px) {
  .sidebar-nav .nav-section:first-child {
    margin-top: 40px;
  }
    }

    .nav-header {
      color: var(--text);
      font-size: 1em;
      font-weight: 600;
      margin: 12px 0 8px;
      padding: 8px 12px;
      border-radius: 8px;
      background: var(--panel1);
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      transition: all 0.2s;
    }

    .nav-header:hover {
      background: var(--brand);
      color: white;
    }

    .toggle-icon {
      font-size: 0.8em;
      transition: transform 0.3s;
      margin-left: 8px;
    }
    .nav-header.expanded .toggle-icon {
      transform: rotate(90deg);
    }
    .nav {
      display: flex;
      flex-direction: column;
      gap: 4px;
      transition: max-height 0.3s, opacity 0.3s;
      max-height: 1000px;
      opacity: 1;
      overflow: hidden;
    }
    .nav.collapsed {
      max-height: 0;
      opacity: 0;
      pointer-events: none;
    }

    .nav {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .nav-button,
    .nav button {
      display: flex;
      align-items: center;
      gap: 12px;
      width: 100%;
      padding: 10px 12px;
      border: none;
      border-radius: 8px;
      background: transparent;
      color: var(--text);
      font-size: 0.95em;
      text-align: left;
      cursor: pointer;
      transition: all 0.2s;
    }

    .nav-button:hover,
    .nav button:hover {
      background: var(--panel1);
      color: var(--brand);
      transform: translateX(3px);
    }

    .nav-button.active {
      background: #2056b3;
      color: #fff;
      font-weight: 500;
    }

    /* Main Content */
    main {
      flex: 1;
      padding: 24px 32px;
      min-height: calc(100vh - 65px);
      max-width: 1150px;
    }

    .wrap.app {
      display: flex;
      width: 100%;
    }

    /* Cards Grid */
    .cards {
      display: grid;
      grid-template-columns: repeat(12, 1fr);
      gap: 24px;
      width: 100%;
    }

    .card {
      background: var(--panel2);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 24px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    .span-12 { grid-column: span 12; }
    .span-7 { grid-column: span 7; }
    .span-6 { grid-column: span 6; }
    .span-5 { grid-column: span 5; }

    /* Feature Grid */
    .feature-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 24px;
      margin-top: 24px;
    }

    .feature-card {
      background: var(--panel2);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 24px;
      cursor: pointer;
      transition: all 0.3s;
    }

    .feature-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 24px rgba(0,0,0,0.1);
      border-color: var(--brand);
    }

    .feature-icon {
      font-size: 2.5em;
      margin-bottom: 16px;
      display: inline-block;
    }

    .feature-card h3 {
      font-size: 1.3em;
      margin-bottom: 12px;
      color: var(--text);
      font-weight: 600;
    }

    .feature-card p {
      color: var(--muted);
      line-height: 1.6;
      margin-bottom: 16px;
    }

    .feature-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .tag {
      background: var(--panel1);
      padding: 6px 12px;
      border-radius: 20px;
      font-size: 0.85em;
      color: var(--muted);
      border: 1px solid var(--border);
      transition: all 0.2s;
    }

    .tag:hover {
      background: var(--brand);
      color: white;
      border-color: var(--brand);
    }

    /* Buttons */
    .cta, .primary-btn {
      background: var(--brand);
      color: white;
      border: none;
      padding: 10px 20px;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }

    .cta:hover, .primary-btn:hover {
      opacity: 0.9;
      transform: translateY(-1px);
    }

    .clear-btn, .secondary {
      background: var(--panel1);
      color: var(--text);
      border: 1px solid var(--border);
      padding: 10px 20px;
      border-radius: 8px;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.2s;
    }

    .clear-btn:hover, .secondary:hover {
      background: var(--panel2);
    }

    /* Form Elements */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="date"],
    input[type="file"],
    input[type="color"],
    select,
    textarea {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 14px;
      margin-bottom: 12px;
      font-family: inherit;
    }

    label {
      display: block;
      margin-bottom: 6px;
      font-weight: 500;
      color: var(--text);
    }

    /* Footer */
    footer {
      background: var(--panel2);
      border-top: 1px solid var(--border);
      padding: 32px 24px;
      margin-top: 48px;
      text-align: center;
    }

    footer p {
      color: var(--muted);
      margin: 8px 0;
      font-size: 0.9em;
    }

    footer a {
      color: var(--muted);
      text-decoration: underline;
      transition: color 0.2s;
    }

    footer a:hover {
      color: var(--brand);
    }

    footer svg {
      vertical-align: middle;
      transition: transform 0.2s, opacity 0.2s;
    }

    footer a:hover svg {
      transform: translateY(-2px);
      opacity: 0.8;
    }

    /* Utility Classes */
    [hidden] {
      display: none !important;
    }

    .kpi {
      font-size: 1.5em;
      font-weight: 700;
      color: var(--brand);
      margin: 16px 0;
    }

    .muted {
      color: var(--muted);
      font-size: 0.95em;
    }

    .row {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 12px;
    }

    .col-4 {
      flex: 1;
      min-width: 150px;
    }

    .hint {
      color: var(--muted);
      font-size: 0.9em;
      margin-top: 8px;
    }

    
    /* Google AdSense Auto Ads ativo - CSS removido (não necessário) */

    /* Responsive Design */
    @media (max-width: 900px) {
      .menu-toggle {
        display: flex !important;
        flex-direction: column;
        order: -1;
        z-index: 101;
        background: var(--brand);
        border-radius: 8px;
        padding: 10px;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
        align-items: center;
        gap: 4px;
        box-shadow: 0 2px 6px rgba(55, 125, 255, 0.3);
        -webkit-tap-highlight-color: transparent;
        -webkit-user-select: none;
        user-select: none;
        touch-action: manipulation;
      }
      
      .menu-bar {
        width: 20px;
        height: 2px;
        background: white !important;
        border-radius: 2px;
        display: block !important;
      }

      .wrap.topbar {
        padding: 8px 12px;
        gap: 12px;
      }

      .sidebar {
        position: fixed;
        left: -250px;
        top: 65px;
        z-index: 90;
        background: var(--panel2);
        transition: left 0.3s ease-in-out;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
        width: 250px;
        height: calc(100vh - 65px);
      }

      .sidebar.active {
        left: 0;
      }

      .sidebar-overlay {
        display: none;
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 85;
        -webkit-tap-highlight-color: transparent;
      }

      .sidebar-overlay.active {
        display: block;
      }

      main {
        padding: 16px;
        max-width: 100%;
      }

      .wrap.topbar {
        padding: 12px;
      }

      .span-7, .span-6, .span-5 {
        grid-column: span 12;
      }

      .feature-grid {
        grid-template-columns: 1fr;
        gap: 16px;
      }

      .header-controls #langSelect {
        display: none;
      }

      .theme-toggle span:last-child {
        display: none;
      }

      .search-container {
        max-width: 200px;
      }

      .card {
        padding: 16px;
      }

      .feature-card {
        padding: 20px;
      }
    }

    @media (max-width: 600px) {
      .wrap.topbar {
        padding: 6px 8px;
        gap: 8px;
      }

      .logo span:last-child {
        font-size: 0.9em;
      }

      .search-container {
        display: none;
      }

      /* Simplificar layout mobile - manter grid mas com 1 coluna */
      .cards {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 20px;
        max-width: 100%;
      }
      
      .card {
        padding: 12px;
        margin: 0 auto;
        width: 100%;
        max-width: calc(100vw - 60px);
        box-sizing: border-box;
      }
      
      /* Resetar spans para funcionar com 1 coluna */
      .span-12, .span-7, .span-6, .span-5 {
        grid-column: 1;
      }
      
      /* Feature grid simplificado */
      .feature-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 16px;
        padding: 0 20px;
      }
      
      .feature-card {
        padding: 12px;
        margin: 0 auto;
        max-width: calc(100vw - 60px);
      }
      
      .feature-icon {
        font-size: 1.8em;
        margin-bottom: 10px;
      }
      
      /* Container com padding reduzido */
      main {
        padding: 8px 20px;
      }
      
      .wrap {
        padding: 8px 20px;
      }
    }

    /* Dispositivos menores - ajustes mínimos */
    @media (max-width: 480px) {
      .cards {
        gap: 10px;
        padding: 0 8px;
      }
      
      .card {
        padding: 10px;
        max-width: 480px;
      }
      
      .feature-card {
        padding: 10px;
        max-width: 480px;
      }
      
      .feature-grid {
        padding: 0 8px;
      }
      
      .feature-icon {
        font-size: 1.6em;
        margin-bottom: 8px;
      }
      
      main {
        padding: 6px 8px;
      }
      
      .wrap {
        padding: 6px 8px;
      }
    }

    /* Converters Specific Styles */
    .converters-container {
      position: relative;
    }

    .conv-pane {
      display: none;
      animation: fadeIn 0.3s ease-in;
    }

    .conv-pane.active {
      display: block;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .col-2, .col-3, .col-6, .col-12 {
      flex: 1;
      min-width: 120px;
    }

    .grid {
      display: grid;
      gap: 16px;
    }

    canvas {
      width: 100%;
      height: auto;
      border: 1px solid var(--border);
      border-radius: 8px;
    }


    .jecce-card .title {
      font-weight: bold;
      font-size: 1.1em;
      color: #222;
      margin-bottom: 2px;
    }

    .jecce-card .description {
      font-size: 0.98em;
      color: #444;
      margin-bottom: 8px;
    }

    .jecce-card .responsibles {
      font-size: 0.93em;
      color: #888;
      margin-bottom: 8px;
    }

    .jecce-card .contact-info {
      margin-bottom: 8px;
    }

    .jecce-card .contact-info span {
      display: block;
      color: #555;
    }

    .jecce-card .social-links {
      margin-bottom: 8px;
      display: flex;
      justify-content: center;
      gap: 16px;
    }

    .jecce-card .social-links a {
      color: #444;
      text-decoration: none;
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 1em;
    }

    .jecce-card .cta {
      display: inline-block;
      background: #ff9100;
      color: #fff;
      font-weight: bold;
      padding: 10px 24px;
      border-radius: 8px;
      text-decoration: none;
      font-size: 1em;
      box-shadow: 0 2px 8px rgba(255,145,0,0.08);
      margin-bottom: 6px;
    }

    .jecce-card .cta:hover {
      background: #e68a00;
    }

    .jecce-card .view-link {
      font-size: 0.92em;
      color: #888;
      text-decoration: underline;
    }

    /* Outros estilos existentes... */