
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body { background: #000000; color: #ffffff; font-family: 'DM Sans', sans-serif; overflow: hidden; overscroll-behavior: none; height: 100vh; }
  html { overflow: hidden; overscroll-behavior: none; height: 100vh; }

  /* ── Scrollbar ── */
  ::-webkit-scrollbar { width: 4px; height: 4px; }
  ::-webkit-scrollbar-track { background: #000000; }
  ::-webkit-scrollbar-thumb { background: #1c1c1c; border-radius: 6px; }

  /* ── Sidebar ── */
  #sidebar {
    position: fixed; top: 0; left: 0; height: 100vh;
    width: 260px; background: var(--card);
    display: flex; flex-direction: column;
    z-index: 100; transition: width 0.3s ease;
  }
  #sidebar.collapsed { width: 82px; overflow: visible; }

  /* Collapsed: hover expands to full width, floats OVER content */
  #sidebar.collapsed:hover {
    width: 260px;
    box-shadow: 4px 0 24px rgba(0,0,0,0.6);
    z-index: 150;
  }

  /* Hide text elements when collapsed and NOT hovering */
  #sidebar.collapsed:not(:hover) .nav-label,
  #sidebar.collapsed:not(:hover) .logo-text,
  #sidebar.collapsed:not(:hover) .sidebar-section-label { display: none; }

  /* Show text elements when collapsed and hovering */
  #sidebar.collapsed:hover .nav-label,
  #sidebar.collapsed:hover .logo-text,
  #sidebar.collapsed:hover .sidebar-section-label { display: block; }

  /* logo-icon always visible, always same position */
  #sidebar.collapsed .logo-icon { flex-shrink: 0; }

  /* Logo area: always same height, just center horizontally when not hovering */
  #sidebar.collapsed:not(:hover) .logo-area {
    justify-content: center;
    padding: 0;
    gap: 0;
  }
  /* Toggle button hidden when collapsed not hovering — bat icon alone */
  #sidebar.collapsed:not(:hover) .sidebar-toggle-inner { display: none; }
  #sidebar.collapsed:hover .sidebar-toggle-inner { display: flex; }

  /* Logo area restored when hovering */
  #sidebar.collapsed:hover .logo-area {
    justify-content: flex-start;
    padding: 0 14px;
    gap: 10px;
  }

  /* Nav items: centered icon when collapsed, full layout when hovering */
  #sidebar.collapsed:not(:hover) .nav-item {
    justify-content: center;
    padding-left: 0; padding-right: 0;
    margin: 1px 6px;
  }
  #sidebar.collapsed:hover .nav-item {
    justify-content: flex-start;
    padding-left: 15px; padding-right: 15px;
    margin: 0 15px;
  }


  .logo-area {
    display: flex; align-items: center; gap: 10px;
    padding: 0 14px;
    height: 62px;
    flex-shrink: 0;
  }
  .logo-icon {
    width: 30px; height: 30px; border-radius: 6px;
    background: #ffffff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; box-shadow: 0 0 14px rgba(184,246,253,0.4);
  }
  .logo-text { font-weight: 700; font-size: 15px; letter-spacing: -0.3px; white-space: nowrap; transition: opacity 0.2s; flex:1; }
  .logo-text span { color: var(--accent); }

  /* Toggle — same 22px icon size as nav icons, no extra visual weight */
  .sidebar-toggle-inner {
    width: 28px; height: 28px; border-radius: 6px;
    background: transparent; border: 1px solid var(--border);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-3); transition: all 0.15s; flex-shrink: 0;
    padding: 0;
  }
  .sidebar-toggle-inner:hover { border-color: var(--accent); color: var(--accent); background: rgba(184,246,253,0.08); }

  .nav-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 0; display: flex; flex-direction: column; gap: 2px; }
  .nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 0 15px; height: 42px; cursor: pointer;
    color: #ffffff; font-size: 15px; font-weight: 400;
    border-radius: 4px;
    margin: 0 15px;
    transition: all 0.15s;
    white-space: nowrap; position: relative;
    border-left: none;
  }
  .nav-item:hover {
    background: rgba(184,246,253,0.06);
    color: #ffffff;
  }
  .nav-item.active {
    background: rgba(184,246,253,0.15);
    color: #ffffff;
    font-weight: 400;
  }
  .nav-item.active .nav-icon { color: var(--accent); }
  .nav-item .nav-icon { flex-shrink: 0; width: 20px; height: 20px; color: #ffffff; }
  .nav-label { transition: opacity 0.2s; }
  /* ── Main Content ── */
  #main { margin-left: 260px; height: 100vh; overflow-y: auto; overflow-x: hidden; overscroll-behavior: none; transition: margin-left 0.3s ease; }
  #main.expanded { margin-left: 82px; }

  /* ── Layer 1: Topbar ── */
  #topbar {
    height: 62px; background: var(--card); border-radius: 6px;
    display: flex; align-items: center;
    padding: 11px 14px; gap: 10px;
    position: sticky; top: 0; z-index: 60;
  }
  .topbar-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
  .topbar-title { font-size: 20px; font-weight: 500; color: #ffffff; }
  /* ── Layer 2: Sub-bar wrapper — transparent gap so content scrolls through ── */

  /* Re-enable pointer events only on the card itself */
  .utmi-filter-label {
    font-size: 11px; color: var(--text-3); font-weight: 500;
    margin-bottom: 6px; display: flex; align-items: center; gap: 3px;
  }
  /* ── Prêmios (topbar) ── */
  .topbar-meta { display: flex; align-items: center; gap: 10px; padding: 4px 12px; border-radius: 8px; cursor: default; }
  .topbar-meta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .aw-ico { flex: 0 0 auto; width: 22px; height: 22px; color: var(--accent); }
  .aw-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
  .aw-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; white-space: nowrap; }
  .aw-label { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .2px; }
  .aw-val { font-size: 13px; color: #cfd6df; font-variant-numeric: tabular-nums; }
  .aw-val strong { color: #fff; font-weight: 700; }
  .aw-bar { width: 190px; height: 8px; background: #2a3140; border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
  .aw-fill { height: 100%; width: 0; border-radius: 8px; background: #B8F6FD; transition: width .8s ease; }
  .topbar-meta.aw-load .aw-val { opacity: .75; }

  /* ── Topbar user ── */
  .topbar-user {
    display: flex; align-items: center; gap: 9px;
    cursor: default; padding: 6px 10px; border-radius: 6px;
    border: none; background: transparent; transition: background 0.15s;
  }
  .topbar-user-wrap { position: relative; flex-shrink: 0; }
  .topbar-user { cursor: pointer; }
  .topbar-user:hover, .topbar-user[aria-expanded="true"] { background: rgba(255,255,255,0.04); }
  .topbar-user-chev { color: var(--text-3); flex-shrink: 0; transition: transform 0.2s; }
  .topbar-user[aria-expanded="true"] .topbar-user-chev { transform: rotate(180deg); }
  .topbar-user-menu {
    position: absolute; top: calc(100% + 6px); right: 0; min-width: 180px;
    background: #1c1c1c; border: 1px solid #2a2a2a; border-radius: 6px; padding: 6px;
    z-index: 600; box-shadow: 0 12px 40px rgba(0,0,0,0.6); animation: fadeIn 0.12s ease;
  }
  .topbar-user-menu.hidden { display: none; }
  .topbar-user-item {
    display: flex; align-items: center; width: 100%; padding: 9px 12px; border: none; border-radius: 6px;
    background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; font-family: inherit;
    text-align: left; cursor: pointer; transition: all 0.12s;
  }
  .topbar-user-item:hover { background: rgba(184,246,253,0.08); color: #ffffff; }
  .topbar-logo { display: none; }
  /* filtros: 4 colunas no desktop */
  .utmi-filter-label { margin-bottom: 4px; }
  .topbar-user-info { display: flex; flex-direction: column; text-align: left; min-width: 0; }
  .topbar-user-name { font-size: 12.5px; font-weight: 700; color: #ffffff; white-space: nowrap; }
    .topbar-user-avatar {
    width: 32px; height: 32px; border-radius: 6px;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; letter-spacing: -0.5px; flex-shrink: 0; color:var(--accent-ink);
  }

  /* Icon buttons in topbar */
  .topbar-icon-btn {
    width: 30px; height: 30px; border-radius: 6px;
    background: transparent; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--text-3); transition: all 0.15s; flex-shrink: 0;
  }
  .topbar-icon-btn:hover { color: var(--accent); }
  .topbar-icon-btn.active { color: var(--accent); }

  /* Editar Painel button */

  /* Atualizar button */
    @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

  /* ── Período de Visualização Dropdown ── */

  /* ── Generic filter dropdown (Product + Currency) ── */
  .filter-dropdown {
    position: absolute; top: calc(100% + 6px); left: 0;
    background: #0a0a0a; border: 1px solid #242424;
    border-radius: 6px; padding: 6px; z-index: 600;
    min-width: 200px; box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    animation: fadeIn 0.12s ease;
  }
  .filter-dropdown.hidden { display: none; }
  .filter-opt {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 12px; border-radius: 6px; cursor: pointer;
    font-size: 13px; color: var(--text-2); font-weight: 500; transition: all 0.12s;
  }
  .filter-opt:hover { background: rgba(184,246,253,0.08); color: #ffffff; }
  .filter-opt.selected { background: rgba(184,246,253,0.15); color: var(--accent); }
  /* Editar Painel button */

  /* Icon buttons in topbar */
  .topbar-icon-btn {
    width: 32px; height: 32px; border-radius: 6px;
    background: transparent; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--text-3); transition: all 0.15s; flex-shrink: 0;
  }
  .topbar-icon-btn:hover { color: var(--accent); }
  .topbar-icon-btn.active { color: var(--accent); }

  /* Atualizar button */
    @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

  /* ── Período de Visualização Dropdown ── */

  .btn-primary {
    background: var(--accent);
    color:var(--accent-ink); border: none; cursor: pointer;
    padding: 11px 21px; height: 38px; border-radius: 6px;
    font-size: 14px; font-weight: 500; font-family: inherit;
    display: flex; align-items: center; gap: 6px;
    transition: all 0.2s; white-space: nowrap;
    box-shadow: 0 2px 12px rgba(184,246,253,0.3);
  }
  .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(184,246,253,0.45); }


  /* ── Pages ── */
  .page { display: none; padding: 16px 24px 24px; }
  .page.active { display: block; }

  /* Grab cursor ONLY in edit mode */



  /* card-close: HIDDEN by default, only show in edit mode */


  /* ── Chart Container ── */
  .chart-card {
    background: var(--card); border: none;
    border-radius: 6px; padding: 20px; overflow: hidden;
  }
    .chart-title { font-size: 13px; font-weight: 600; color: #ffffff; }
  /* ── Filter Tags ── */

  /* ── Dropdown ── */
  .dropdown {
    position: absolute; right: 10px; top: 36px;
    background: #0a0a0a; border: 1px solid var(--border);
    border-radius: 6px; padding: 4px; z-index: 200;
    min-width: 160px; box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    animation: fadeIn 0.12s ease;
  }
  /* ── Sales Table ── */
  .status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600; padding: 3px 8px;
    border-radius: 6px;
  }


  /* ── Animations ── */
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  @keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
  @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

  /* ── Live indicator ── */

  /* ── Notification dot ── */

  /* ── Calendar (Personalizado) ── */

  /* ══ EDIT MODE ══════════════════════════════════════════════════════ */

  /* Left metrics panel — overlays sidebar completely, starts from top */

  /* Main does NOT shift — panel covers sidebar */
  /* IN USE — dashed faded border, disabled */
  /* ── Accordion styles ── */

  /* Edit-mode dashboard items */

  /* Drop placeholder preview */
  /* Dashboard main sortable container */
  /* ══ DASHBOARD GRID ══════════════════════════════════════════════════ */

  /* ── span classes — measured from reference devtools ── */
  /* metric: 1col × 1row = 95px */
  /* tall chart (Vendas por Produto / Pagamento): 1col × 3rows = 3×95+2×20 = 325px */
  /* wide chart (Vendas por Fonte): 2col × 2rows = 2×95+1×20 = 210px tall */
  /* side chart (Taxa de Aprovação): 1col × 2rows = 210px tall */
  /* full-width: 4col × 2rows */

  /* edit mode */

  /* ── Metric internals ── */
  /* título + valor = um bloco só, centralizado na vertical e alinhado à esquerda; ⓘ/× ficam no canto do card (.dw é position:relative) */
  /* "i" na linha do título: ícone 15px a 21px da borda direita; o botão tem 44px de toque (invisível) */
  /* ocultar números: o sinal não aparece nem no título nem no "i" */
  /* ── Chart internals ── */


  /* map overlay */

  /* ══ NEW PAGES CSS ════════════════════════════════════════════════════ */


  /* Product cards */
  /* Checkout config */
  .co-card { background:var(--card); border:1px solid var(--border); border-radius:6px; padding:20px; }
  .co-section-title { font-size:13px; font-weight:700; color:#ffffff; margin-bottom:16px; padding-bottom:12px; border-bottom:1px solid var(--border); }
  .toggle-row { display:flex; align-items:center; justify-content:space-between; padding:10px 0; border-bottom:1px solid #0a0a0a; font-size:13px; color:var(--text-2); }
  .toggle-sw { position:relative; display:inline-block; width:40px; height:22px; }
  .toggle-sw input { opacity:0; width:0; height:0; }
  .toggle-sl { position:absolute; inset:0; background:#1c1c1c; border-radius:8px; cursor:pointer; transition:0.3s; }
  .toggle-sl:before { content:''; position:absolute; width:16px; height:16px; left:3px; bottom:3px; background:white; border-radius:8px; transition:0.3s; }
  .toggle-sw input:checked + .toggle-sl { background:var(--accent);color:var(--accent-ink); }
  .toggle-sw input:checked + .toggle-sl:before { transform:translateX(18px); }




  /* ── Account pages ── */
  .acc-card { background:var(--card); border-radius:6px; padding:20px 22px; }
  .acc-card-header { display:flex; align-items:center; justify-content:space-between; padding-bottom:14px; border-bottom:1px solid var(--border); margin-bottom:4px; }
  .acc-card-title { font-size:14px; font-weight:700; color:#ffffff; }
  .acc-icon-btn { background:transparent; border:none; cursor:pointer; color:var(--text-3); padding:4px; transition:color 0.15s; }
  .acc-icon-btn:hover { color:var(--accent); }
  .acc-field-label { font-size:11px; color:var(--text-3); font-weight:600; letter-spacing:0.5px; text-transform:uppercase; margin-bottom:6px; display:block; }
  .acc-field-input { width:100%; box-sizing:border-box; background:var(--card); border:1px solid var(--border); border-radius:6px; padding:10px 14px; font-size:13px; color:#ffffff; font-family:inherit; outline:none; transition:border-color 0.2s; }
  .acc-field-input:focus { border-color:var(--accent); }
  .acc-btn-primary { background:var(--accent); color:var(--accent-ink); border:none; border-radius:6px; padding:9px 22px; font-size:13px; font-weight:700; cursor:pointer; font-family:inherit; transition:background 0.15s; }
  .acc-btn-primary:hover { background:var(--accent-hover);color:var(--accent-ink); }
  .acc-btn-ghost { background:transparent; color:var(--text-2); border:1px solid var(--border); border-radius:6px; padding:9px 22px; font-size:13px; font-weight:600; cursor:pointer; font-family:inherit; transition:all 0.15s; }
  .acc-btn-ghost:hover { border-color:var(--accent); color:#ffffff; }
  .acc-btn-danger { background:#ef4444; color:white; border:none; border-radius:6px; padding:9px 22px; font-size:13px; font-weight:700; cursor:pointer; font-family:inherit; transition:background 0.15s; }
  .acc-btn-danger:hover { background:#dc2626; }


  .flex { display: flex; }
  .hidden { display: none; }
  .block { display: block; }
  .inline-block { display: inline-block; }
  .relative { position: relative; }
  .absolute { position: absolute; }


  /* ══════════════════════════════════════════════════════════════
     RESPONSIVE — TABLET (max-width: 1024px)
  ══════════════════════════════════════════════════════════════ */
  @media (max-width: 1024px) {
    /* Sidebar colapsa para ícones */
    #sidebar { width: 82px; }
    #sidebar .nav-label,
    #sidebar .logo-text,
    #sidebar .logo-icon,
    #sidebar .sidebar-section-label { display: none; }
    #sidebar .nav-item { justify-content: center; padding-left: 0; padding-right: 0; margin: 1px 6px; }
    #sidebar .logo-area { justify-content: center; padding: 0; }
    #sidebar .sidebar-toggle-inner { border-color: transparent; background: transparent; }
    #main { margin-left: 82px; }
    #main.expanded { margin-left: 82px; }

    /* Dashboard grid: 2 colunas no tablet */

    /* Subbar: filtros em 2 colunas */

    /* Topbar: oculta título, mantém ícones */
    .topbar-title { font-size: 18px; }
    .topbar-meta { padding: 2px 4px; gap: 6px; }
    .topbar-meta .aw-label { display: none; }
    .topbar-meta .aw-ico { width: 18px; height: 18px; }
    .topbar-meta .aw-val { font-size: 11px; }
    .topbar-meta .aw-bar { width: 92px; height: 6px; }

    /* Meta tabs: menores */

    /* Meta filter row: wrap */

  }

  /* ══════════════════════════════════════════════════════════════
     RESPONSIVE — MOBILE (max-width: 640px)
  ══════════════════════════════════════════════════════════════ */
  @media (max-width: 640px) {

    /* ── Sidebar: oculta completamente, hamburger toggle ── */
    #sidebar {
      width: 100% !important;
      height: auto;
      position: fixed;
      bottom: 0; top: auto; left: 0; right: 0;
      flex-direction: row;
      z-index: 200;
      background: var(--card);
      border-top: 1px solid var(--border);
      padding: 0;
      overflow: visible;
    }
    #sidebar .logo-area { display: none; }
    #sidebar .sidebar-section-label { display: none; }
    #sidebar .nav-scroll {
      display: flex; flex-direction: row;
      overflow-x: auto; overflow-y: hidden;
      padding: 0; width: 100%;
      scrollbar-width: none;
    }
    #sidebar .nav-scroll::-webkit-scrollbar { display: none; }
    #sidebar .nav-item {
      flex-direction: column; gap: 3px;
      padding: 8px 10px; margin: 0;
      min-width: 56px; border-radius: 0;
      justify-content: center; align-items: center;
      flex-shrink: 0;
    }
    #sidebar .nav-item .nav-icon { width: 18px; height: 18px; }
    #sidebar .nav-label {
      display: block !important;
      font-size: 11px; font-weight: 500;
      color: var(--text-3); text-align: center;
      line-height: 1.2; max-width: 56px;
      overflow: hidden; text-overflow: ellipsis;
      white-space: nowrap;
    }
    #sidebar .nav-item.active .nav-label { color: var(--accent); }
    #sidebar .nav-badge { position: absolute; top: 4px; right: 4px; font-size: 8px; padding: 1px 3px; }

    /* Main: espaço para bottom nav */
    #main {
      margin-left: 0 !important;
      padding-bottom: 64px;
    }
    #main.expanded { margin-left: 0 !important; }

    /* Topbar mobile */
    #topbar {
      padding: 0 12px;
      gap: 6px;
      height: 64px;
    }
    /* logo à esquerda, título centralizado (sem corte), nome do usuário escondido */
    .topbar-left { display: contents; }
    .topbar-logo { display: flex; order: 0; width: 28px; height: 28px; flex-shrink: 0; }
    .topbar-logo svg { width: 20px; height: 20px; }
    .topbar-title { order: 1; flex: 1; min-width: 0; text-align: center; font-size: 17px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    #themeToggleBtn { order: 4; }
    #topbar > div[style*="flex-shrink:0"] { order: 5; }
    .topbar-meta { padding: 2px 4px; gap: 6px; }
    .topbar-meta .aw-label { display: none; }
    .topbar-meta .aw-ico { width: 18px; height: 18px; }
    .topbar-meta .aw-val { font-size: 11px; }
    .topbar-meta .aw-bar { width: 92px; height: 6px; }
    .topbar-user-wrap { display: none !important; }

    /* Subbar mobile: vertical stack */

    /* Subbar filtros: 1 coluna */

    /* Dashboard grid: 1 coluna mobile */
    /* Charts que precisam de altura definida */

    /* Pages: padding menor */
    .page { padding: 12px 17px 20px !important; }

    /* Topbar edit banner */

    /* Products page */
    #page-products [style*="display:flex;align-items:center;justify-content:space-between"] {
      flex-direction: column !important; align-items: flex-start !important; gap: 10px;
    }
    #page-products [style*="display:flex;align-items:center;justify-content:space-between"] > div:last-child {
      width: 100%;
    }
    #page-products [style*="display:flex;align-items:center;justify-content:space-between"] .btn-primary,
    #page-products [style*="display:flex;align-items:center;justify-content:space-between"] .btn-ghost {
      width: 100%; justify-content: center;
    }


    /* Meta page: tabs scroll horizontal */

    /* Meta toolbar */

    /* Meta filters: 1 coluna */


    /* Account page */
    #page-account > div { flex-direction: column !important; }
    #page-account > div > div { min-width: unset !important; }



    /* Charts canvas: força resize */
    canvas { max-width: 100% !important; }

    /* Period dropdown */
    .period-dropdown, .filter-dropdown, .meta-drop { min-width: unset !important; width: 100%; }

    /* Edit panel mobile */

    /* Taxes page */


  }

  /* Extra pequeno (320px) */
  @media (max-width: 380px) {
    .topbar-title { max-width: 90px; }
  }

  /* ══════════════════════════════════════════════════════════════
     LOGIN (#authScreen) — layout responsivo
     O HTML usa estilos inline; por isso !important. Só vale em telas estreitas,
     o desktop (>900px) fica idêntico.
  ══════════════════════════════════════════════════════════════ */
  @media (max-width: 900px) {
    /* coluna visual (esquerda) some; o formulário ocupa a tela toda */
    #authScreen > div:first-child { display: none !important; }
    #authScreen > div:nth-child(2) {
      width: 100% !important; border-left: none !important;
      padding: 32px 24px !important;
      justify-content: flex-start !important;   /* formulário alto não corta o topo; rola */
    }
    #authScreen > div:nth-child(2)::before {
      content: "Zap"; color: #ffffff; font-size: 22px; font-weight: 800;
      letter-spacing: -.3px; margin-bottom: 28px; flex-shrink: 0;
    }
    #authScreen > div:nth-child(2) > div {
      max-width: 420px; margin-top: auto; margin-bottom: auto;   /* centraliza quando sobra espaço */
    }
  }
  @media (max-width: 640px) {
    #authScreen > div:nth-child(2) { padding: 24px 20px !important; }
    /* 16px evita o zoom automático do iOS; 44px é o alvo mínimo de toque */
    #authScreen input:not([type="checkbox"]) { font-size: 16px !important; min-height: 44px; }
    #authScreen button { min-height: 44px; }
    #authScreen button[onclick^="togglePassVis"] { min-width: 44px; }
    #authScreen input[type="checkbox"] { width: 20px !important; height: 20px !important; }
    #authScreen label:has(> input[type="checkbox"]) { min-height: 44px; }
  }
  @media (max-width: 380px) {
    #cadastroFormElement [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  }


  /* ── Meta Ads Manager page ── */
  #page-integrations.active { display: flex !important; padding: 0 !important; }
  /* ════════════════════════════════════════════
     META ADS MANAGER — TAB NAVIGATION
  ════════════════════════════════════════════ */
  /* ── Meta Ads table ── */
  /* Larguras por COLUNA (classe / data-col), não por posição: reordenar em "Personalizar colunas" mantém cada largura */

  /* Sticky columns — fixed left: checkbox | STATUS | name */
  /* Scroll wrapper */
  /* Fixed identical row height for ALL rows */
  /* Toggle switch */

  #page-links.active { display: flex !important; flex-direction: column !important; padding: 0 !important; }

  /* ── ONBOARDING ─────────────────────────────────────────────────────────── */
  #onboardingOverlay {
    position:fixed;inset:0;z-index:99999;
    background:rgba(5,8,15,0.92);
    backdrop-filter:blur(8px);
    display:flex;align-items:center;justify-content:center;
    opacity:1;transition:opacity 0.4s ease;
  }
  #onboardingOverlay.fade-out { opacity:0;pointer-events:none; }

  .ob-card {
    background:var(--card);border:1px solid var(--border);border-radius:6px;
    width:540px;max-width:calc(100vw - 32px);
    padding:40px 44px;position:relative;
    box-shadow:0 24px 80px rgba(0,0,0,0.7);
  }

  .ob-skip {
    position:absolute;top:20px;right:20px;
    background:transparent;border:none;
    color:var(--text-3);font-size:12px;font-weight:500;font-family:inherit;
    cursor:pointer;display:inline-flex;align-items:center;gap:4px;
    transition:color 0.15s;padding:4px 8px;border-radius:6px;
  }
  .ob-skip:hover { color:var(--text-2);background:rgba(255,255,255,0.04); }

  .ob-dots { display:flex;gap:6px;margin-bottom:28px; }
  .ob-dot {
    width:6px;height:6px;border-radius:6px;background:#1c1c1c;
    transition:all 0.3s;
  }
  .ob-dot.active { width:20px;background:var(--accent);color:var(--accent-ink); }
  .ob-dot.done   { background:#242424; }

  .ob-icon-wrap {
    width:52px;height:52px;border-radius:6px;
    background:linear-gradient(135deg,var(--detail),#1c1c1c);
    border:1px solid #242424;
    display:flex;align-items:center;justify-content:center;
    margin-bottom:20px;font-size:24px;
  }

  .ob-title  { font-size:22px;font-weight:700;color:#ffffff;margin-bottom:8px;line-height:1.3; }
  .ob-sub    { font-size:14px;color:var(--text-2);margin-bottom:28px;line-height:1.6; }

  .ob-checklist { display:flex;flex-direction:column;gap:12px;margin-bottom:32px; }
  .ob-check-item {
    display:flex;align-items:center;gap:12px;
    background:#000000;border:1px solid var(--border);border-radius:6px;
    padding:12px 16px;
  }
  .ob-check-num {
    width:28px;height:28px;border-radius:6px;
    background:var(--detail);border:1px solid #242424;
    display:flex;align-items:center;justify-content:center;
    font-size:11px;font-weight:700;color:var(--accent);flex-shrink:0;
  }
  .ob-check-text { font-size:13px;color:#ffffff;font-weight:500; }
  .ob-check-sub  { font-size:11px;color:var(--text-3);margin-top:1px; }

  .ob-grid-2 { display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:28px; }
  .ob-grid-3 { display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;margin-bottom:28px; }

  .ob-sel-card {
    background:#000000;border:1.5px solid var(--border);border-radius:6px;
    padding:18px 16px;cursor:pointer;
    display:flex;flex-direction:column;align-items:center;gap:10px;
    transition:all 0.18s;text-align:center;
    user-select:none;
  }
  .ob-sel-card:hover { border-color:#242424;background:#101520; }
  .ob-sel-card.selected {
    border-color:var(--accent);background:var(--detail);
    box-shadow:0 0 0 1px var(--accent), 0 0 20px rgba(184,246,253,0.15);
  }
  .ob-sel-card .ob-sc-icon {
    width:40px;height:40px;border-radius:6px;
    display:flex;align-items:center;justify-content:center;font-size:18px;
    flex-shrink:0;
  }
  .ob-sel-card .ob-sc-label { font-size:13px;font-weight:600;color:#ffffff; }

  .ob-pixel-field { display:flex;flex-direction:column;gap:6px;margin-bottom:16px; }
  .ob-pixel-label {
    font-size:12px;font-weight:600;color:var(--text-2);
    display:flex;align-items:center;gap:6px;
  }
  .ob-pixel-optional {
    font-size:11px;color:#242424;background:#0d1e35;
    padding:2px 6px;border-radius:4px;font-weight:500;
  }
  .ob-pixel-input {
    background:#000000;border:1px solid var(--border);border-radius:6px;
    padding:10px 14px;font-size:13px;color:#ffffff;font-family:inherit;
    outline:none;transition:border-color 0.15s;width:100%;box-sizing:border-box;
  }
  .ob-pixel-input:focus { border-color:var(--accent); }
  .ob-pixel-input::placeholder { color:#2d3748; }
  .ob-pixel-hint { font-size:11px;color:#334155; }

  .ob-btn-row { display:flex;align-items:center;justify-content:space-between;margin-top:4px; }
  .ob-btn-back {
    background:transparent;border:1px solid var(--border);border-radius:6px;
    padding:0 20px;height:40px;color:var(--text-2);font-size:13px;font-weight:500;
    font-family:inherit;cursor:pointer;transition:all 0.15s;
  }
  .ob-btn-back:hover { border-color:#242424;color:#ffffff; }
  .ob-btn-next {
    background:var(--accent);border:none;border-radius:6px;
    padding:0 28px;height:40px;color:var(--accent-ink);font-size:13px;font-weight:600;
    font-family:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:8px;
    transition:background 0.15s;
  }
  .ob-btn-next:hover { background:var(--accent-hover);color:var(--accent-ink); }
  .ob-btn-next svg { width:14px;height:14px; }

  /* Success screen */
  .ob-success {
    display:flex;flex-direction:column;align-items:center;
    text-align:center;padding:12px 0;
  }
  .ob-confetti { font-size:56px;margin-bottom:20px;animation:ob-pop 0.4s ease; }
  @keyframes ob-pop { 0%{transform:scale(0.5);opacity:0} 70%{transform:scale(1.15)} 100%{transform:scale(1);opacity:1} }
  .ob-success-title { font-size:26px;font-weight:700;color:#ffffff;margin-bottom:8px; }
  .ob-success-sub   { font-size:14px;color:var(--text-2);margin-bottom:32px; }
  .ob-progress-dots { display:flex;gap:8px;justify-content:center; }
  .ob-prog-dot {
    width:8px;height:8px;border-radius:6px;background:#1c1c1c;
    animation:ob-pulse 1.2s ease-in-out infinite;
  }
  .ob-prog-dot:nth-child(2) { animation-delay:0.2s; }
  .ob-prog-dot:nth-child(3) { animation-delay:0.4s; }
  @keyframes ob-pulse { 0%,100%{background:#1c1c1c;transform:scale(1)} 50%{background:var(--accent);transform:scale(1.3);color:var(--accent-ink);} }












  /* ── BUSCA DE PÁGINAS (abre com "/" nas telas sem busca; o Ctrl+K agora é a central de atalhos) ─────────────────────────────────────────────── */
  #gsOverlay {
    position:fixed;inset:0;z-index:100000;
    background:rgba(5,8,15,0.7);backdrop-filter:blur(4px);
    display:none;align-items:flex-start;justify-content:center;
    padding-top:12vh;
  }
  #gsBox {
    width:600px;max-width:calc(100vw - 32px);
    background:var(--card);border:1px solid var(--border);border-radius:6px;
    box-shadow:0 24px 80px rgba(0,0,0,0.7);overflow:hidden;
  }
  #gsInputWrap {
    display:flex;align-items:center;gap:12px;
    padding:16px 20px;border-bottom:1px solid var(--border);
  }
  #gsInput {
    flex:1;background:transparent;border:none;outline:none;
    font-size:16px;color:#ffffff;font-family:inherit;
  }
  #gsInput::placeholder { color:var(--text-3); }
  .gs-kbd {
    font-size:11px;color:var(--text-3);background:#1c1c1c;
    padding:3px 7px;border-radius:6px;font-weight:600;
  }
  #gsResults { max-height:50vh;overflow-y:auto;padding:8px; }
  .gs-section-label {
    font-size:11px;font-weight:700;color:var(--text-3);
    text-transform:uppercase;letter-spacing:.6px;padding:10px 12px 6px;
  }
  .gs-item {
    display:flex;align-items:center;gap:12px;
    padding:10px 12px;border-radius:6px;cursor:pointer;
  }
  .gs-item.gs-active { background:#1c1c1c; }
  .gs-item-icon {
    width:34px;height:34px;border-radius:6px;flex-shrink:0;
    display:flex;align-items:center;justify-content:center;font-size:15px;
    background:var(--card);border:1px solid var(--border);
  }
  .gs-item-body { flex:1;min-width:0; }
  .gs-item-title { font-size:13px;font-weight:600;color:#ffffff; }
  .gs-item-sub { font-size:11px;color:var(--text-3);margin-top:1px; }
  .gs-item-type { font-size:11px;color:var(--text-3);background:var(--card);padding:2px 8px;border-radius:6px;flex-shrink:0; }
  .gs-empty { text-align:center;padding:40px 20px;color:var(--text-3);font-size:13px; }
  #gsFooter {
    display:flex;align-items:center;gap:16px;
    padding:10px 20px;border-top:1px solid var(--border);font-size:11px;color:var(--text-3);
  }
  #gsFooter .gs-hint { display:flex;align-items:center;gap:5px; }

  /* ── METAS COM SEMÁFORO (cards de métrica) ────────────────────────────── */


  /* ── CHANGELOG ────────────────────────────────────────────────────────── */
  #clPanel {
    position:fixed;top:62px;right:0;bottom:0;width:400px;
    background:var(--card);border-left:1px solid var(--border);z-index:9500;
    transform:translateX(100%);transition:transform .28s ease;
    display:flex;flex-direction:column;box-shadow:-12px 0 40px rgba(0,0,0,.5);
  }
  #clPanel.open { transform:translateX(0); }
  #clOverlay { display:none;position:fixed;inset:0;top:62px;z-index:9499;background:rgba(0,0,0,.3); }
  #clOverlay.open { display:block; }

  .cl-head { display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--border);flex-shrink:0; }
  .cl-head-title { font-size:14px;font-weight:700;color:#ffffff;display:flex;align-items:center;gap:8px; }
  .cl-body { flex:1;overflow-y:auto;padding:8px 0 20px; }



  /* ── TOUR INTERATIVO ──────────────────────────────────────────────────── */
  #tourOverlay {
    position:fixed;inset:0;z-index:100001;display:none;
    pointer-events:none;
  }
  #tourOverlay.active { display:block; }
  /* a "máscara" usa box-shadow gigante pra escurecer tudo menos o buraco */
  #tourSpotlight {
    position:absolute;border-radius:6px;
    box-shadow:0 0 0 9999px rgba(5,8,15,0.82);
    transition:all .35s cubic-bezier(.4,0,.2,1);
    pointer-events:none;border:2px solid var(--accent);
  }
  #tourTip {
    position:absolute;width:300px;max-width:calc(100vw - 32px);
    background:var(--card);border:1px solid var(--border);border-radius:6px;
    padding:18px 20px;box-shadow:0 18px 60px rgba(0,0,0,.7);
    pointer-events:auto;transition:all .35s cubic-bezier(.4,0,.2,1);z-index:100002;
  }
  .tour-step-count { font-size:11px;color:var(--accent);font-weight:700;margin-bottom:6px; }
  .tour-title { font-size:15px;font-weight:700;color:#ffffff;margin-bottom:6px; }
  .tour-desc { font-size:12.5px;color:var(--text-2);line-height:1.55;margin-bottom:16px; }
  .tour-actions { display:flex;align-items:center;justify-content:space-between;gap:10px; }
  .tour-dots { display:flex;gap:5px; }
  .tour-dot { width:6px;height:6px;border-radius:6px;background:#1c1c1c;transition:all .25s; }
  .tour-dot.active { width:18px;background:var(--accent);color:var(--accent-ink); }
  .tour-btns { display:flex;gap:8px;align-items:center; }
  .tour-skip {
    background:transparent;border:none;color:var(--text-3);font-size:12px;
    font-family:inherit;cursor:pointer;padding:6px 8px;
  }
  .tour-skip:hover { color:var(--text-2); }
  .tour-next {
    background:var(--accent);border:none;border-radius:6px;padding:0 18px;height:34px;
    color:var(--accent-ink);font-size:12.5px;font-weight:600;font-family:inherit;cursor:pointer;
    transition:background .15s;
  }
  .tour-next:hover { background:var(--accent-hover);color:var(--accent-ink); }
  .tour-prev {
    background:transparent;border:1px solid var(--border);border-radius:6px;
    width:34px;height:34px;color:var(--text-2);font-family:inherit;cursor:pointer;
    display:flex;align-items:center;justify-content:center;
  }
  .tour-prev:hover { border-color:var(--accent);color:#ffffff; }


  /* ── PÁGINAS-HUB (agrupamento da sidebar) ─────────────────────────────── */


  /* ── DIVISOR DA SIDEBAR ───────────────────────────────────────────────── */

  * { box-sizing:border-box; }
  .up { color:#10b981; } .down { color:#ef4444; }

