    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Segoe UI', sans-serif;
      background: #0b1d2a;
      color: #d6efea;
      height: 100vh;
      width: 100vw;
      display: flex;
      overflow: hidden;
    }

    ::-webkit-scrollbar {
      width: 4px;
      height: 4px;
    }

    ::-webkit-scrollbar-track {
      background: transparent;
    }

    ::-webkit-scrollbar-thumb {
      background: rgba(0, 200, 150, 0.2);
      border-radius: 2px;
    }

    /* ── SIDEBAR ── */
    .sidebar {
      width: 240px;
      min-width: 160px;
      max-width: 520px;
      background: #091818;
      display: flex;
      flex-direction: column;
      border-right: 1px solid rgba(0, 200, 150, 0.08);
      flex-shrink: 0;
      height: 100%;
      overflow: hidden;
    }

    .sidebar-grip {
      width: 5px;
      flex-shrink: 0;
      cursor: col-resize;
      background: transparent;
      transition: background 0.2s;
      z-index: 20;
    }
    .sidebar-grip:hover, body.lres-sb .sidebar-grip { background: rgba(0,200,150,0.25); }
    body.lres-sb * { cursor: col-resize !important; user-select: none !important; }

    .sb-logo {
      padding: 12px 16px 10px;
      border-bottom: 1px solid rgba(0, 200, 150, 0.08);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
    }

    .sb-logo img {
      width: 200px;
      height: auto;
      display: block;
    }



    .sb-nav {
      flex: 1 1 auto;
      min-height: 0;
      padding: 12px 0;
      overflow-y: auto;
    }
    /* Ações rápidas só aparecem em mobile */
    .sb-acoes-mob { display: none; }

    .sb-chat-inline {
      flex: 0 0 auto;
      min-height: 220px;
      max-height: 320px;
      display: flex;
      flex-direction: column;
      border-top: 1px solid rgba(0, 200, 150, 0.08);
    }

    .sb-chat-hdr {
      padding: 10px 14px;
      display: flex;
      align-items: center;
      gap: 7px;
      flex-shrink: 0;
      border-bottom: 1px solid rgba(0, 200, 150, 0.06);
    }

    .sb-chat-hdr span { font-size: 12px; font-weight: 600; color: #d6efea; }
    .sb-chat-hdr small { font-size: 11px; color: #5a9898; margin-left: auto; }

    /* ── CARD PERFIL ── */
    .sb-perfil-card{margin:4px 10px 2px;background:rgba(0,200,150,0.04);border:1px solid rgba(0,200,150,0.08);border-radius:10px;padding:9px 11px;}
    .sb-perfil-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px;}
    .sb-perfil-nome{font-size:12px;font-weight:600;color:#b0ddd6;}
    .sb-perfil-del{background:none;border:none;color:#4a7070;cursor:pointer;font-size:11px;padding:0;opacity:0.5;transition:all .15s;}
    .sb-perfil-del:hover{color:#ff6b6b;opacity:1;}
    .sb-perfil-linha{display:flex;justify-content:space-between;font-size:11px;color:#6aabab;margin-bottom:2px;}
    .sb-perfil-linha span:last-child{font-weight:600;}
    .sb-perfil-bar{height:3px;background:rgba(0,200,150,0.1);border-radius:2px;margin:6px 0 5px;}
    .sb-perfil-bar-fill{height:100%;border-radius:2px;transition:width .4s;}
    .sb-perfil-sobrou{display:flex;justify-content:space-between;font-size:12px;font-weight:700;margin-top:1px;}
    .sb-perfil-sobrou .label{color:#8abcbc;}
    .sobrou-pos{color:#00c896;}
    .sobrou-neg{color:#ff6b6b;}

    .sb-label {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 1.5px;
      color: #5a9898;
      padding: 10px 18px 4px;
    }

    .sb-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 9px 18px;
      font-size: 13px;
      color: #8abcbc;
      cursor: pointer;
      border-left: 3px solid transparent;
      transition: all 0.2s;
    }

    .sb-item:hover {
      color: #00c896;
      background: rgba(0, 200, 150, 0.04);
    }

    .sb-item.active {
      color: #00c896;
      background: rgba(0, 200, 150, 0.07);
      border-left-color: #00c896;
    }

    .sb-item .si-left {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .sb-item .si-val {
      font-size: 12px;
      font-weight: 600;
      color: #00c896;
    }

    .sb-total {
      display: flex;
      justify-content: space-between;
      padding: 8px 18px;
      font-size: 12px;
      font-weight: 700;
      border-top: 1px solid rgba(0, 200, 150, 0.08);
      margin-top: 4px;
    }

    .sb-total span:last-child {
      color: #63d4e8;
    }

    .sb-bottom {
      padding: 14px;
    }

    .btn-ia {
      width: 100%;
      background: linear-gradient(135deg, #00c896, #007a5e);
      border: none;
      color: #062020;
      padding: 11px;
      border-radius: 10px;
      cursor: pointer;
      font-size: 12px;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: opacity 0.2s;
    }

    .btn-ia:hover {
      opacity: 0.85;
    }

    /* ── CHAT OVERLAY ── */
    .chat-overlay {
      position: fixed;
      left: 240px;
      top: 0;
      bottom: 0;
      width: 300px;
      background: #091818;
      border-right: 1px solid rgba(0, 200, 150, 0.1);
      display: flex;
      flex-direction: column;
      z-index: 50;
      transform: translateX(calc(-100% - 240px));
      transition: transform 0.3s ease;
      box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
    }

    .chat-overlay.aberto {
      transform: translateX(0);
    }

    .chat-header {
      background: #0e2525;
      padding: 13px 14px;
      display: flex;
      align-items: center;
      gap: 8px;
      border-bottom: 1px solid rgba(0, 200, 150, 0.1);
      flex-shrink: 0;
    }

    .chat-header .dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #00c896;
      box-shadow: 0 0 6px #00c896;
    }

    .chat-header span {
      font-size: 13px;
      font-weight: 600;
      color: #d6efea;
    }

    .chat-header small {
      font-size: 11px;
      color: #6aabab;
      margin-left: auto;
    }

    .btn-chat-close {
      background: none;
      border: none;
      color: #6aabab;
      cursor: pointer;
      font-size: 16px;
      padding: 0 2px;
    }

    .btn-chat-close:hover {
      color: #ff6b6b;
    }

    .chat-msgs {
      flex: 1;
      overflow-y: auto;
      padding: 12px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-height: 0;
    }

    .chat-msg {
      max-width: 92%;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .chat-msg.user {
      align-self: flex-end;
    }

    .chat-msg.ia {
      align-self: flex-start;
    }

    .chat-msg .bubble {
      padding: 9px 12px;
      border-radius: 12px;
      font-size: 13px;
      line-height: 1.55;
      white-space: pre-wrap;
      word-break: break-word;
    }

    .chat-msg.user .bubble {
      background: linear-gradient(135deg, #00c896, #009070);
      color: #031818;
      border-radius: 12px 12px 2px 12px;
    }

    .chat-msg.ia .bubble {
      background: #102828;
      color: #b0ddd6;
      border: 1px solid rgba(0, 200, 150, 0.1);
      border-radius: 12px 12px 12px 2px;
    }

    .julius-tts-btn {
      display: inline-block;
      margin-left: 6px;
      background: none;
      border: none;
      cursor: pointer;
      font-size: 12px;
      opacity: 0.4;
      vertical-align: middle;
      padding: 0 2px;
      transition: opacity .2s;
      line-height: 1;
    }
    .julius-tts-btn:hover { opacity: 1; }

    .chat-msg .tempo {
      font-size: 11px;
      color: #5a9898;
    }

    .chat-msg.user .tempo {
      align-self: flex-end;
    }

    /* ── Card de confirmação de voz ──────────────────────────── */
    .chat-msg.voz-card {
      max-width: 100%;
      align-self: stretch;
    }
    .voz-confirm-card {
      background: rgba(0,200,150,0.06);
      border: 1px solid rgba(0,200,150,0.22);
      border-radius: 14px;
      padding: 14px;
      width: 100%;
      box-sizing: border-box;
    }
    .voz-confirm-row {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 10px;
      margin-bottom: 4px;
    }
    .voz-confirm-desc {
      font-size: 14px;
      font-weight: 700;
      color: #d6efea;
      line-height: 1.3;
    }
    .voz-confirm-valor {
      font-size: 16px;
      font-weight: 800;
      color: #00c896;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .voz-confirm-cat {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      color: #7ae8c8;
      margin: 8px 0 12px;
      background: rgba(0,200,150,0.08);
      border-radius: 8px;
      padding: 6px 10px;
    }
    .voz-confirm-btns {
      display: flex;
      gap: 8px;
    }
    .voz-btn-confirmar {
      flex: 1;
      background: linear-gradient(135deg,#00c896,#009e78);
      border: none;
      border-radius: 10px;
      padding: 12px;
      color: #001a14;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }
    .voz-btn-editar {
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 10px;
      padding: 12px 16px;
      color: #7a9898;
      font-size: 13px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .chat-typing {
      display: none;
      align-self: flex-start;
      background: #102828;
      padding: 10px 14px;
      border-radius: 12px;
      border: 1px solid rgba(0, 200, 150, 0.08);
    }

    .chat-typing span {
      display: inline-block;
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: #00c896;
      margin: 0 2px;
      animation: bounce 1s infinite;
    }

    .chat-typing span:nth-child(2) {
      animation-delay: .15s;
    }

    .chat-typing span:nth-child(3) {
      animation-delay: .3s;
    }

    @keyframes bounce {

      0%,
      60%,
      100% {
        transform: translateY(0)
      }

      30% {
        transform: translateY(-5px)
      }
    }

    .chat-sugestoes {
      padding: 0 10px 8px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex-shrink: 0;
    }

    .chat-sugestao {
      background: rgba(0, 200, 150, 0.05);
      border: 1px solid rgba(0, 200, 150, 0.1);
      border-radius: 6px;
      padding: 5px 8px;
      font-size: 12px;
      color: #7abcbc;
      cursor: pointer;
      text-align: left;
      transition: all 0.15s;
    }

    .chat-sugestao:hover {
      border-color: #00c896;
      color: #00c896;
    }

    .chat-form {
      padding: 10px;
      border-top: 1px solid rgba(0, 200, 150, 0.08);
      display: flex;
      gap: 6px;
      flex-shrink: 0;
    }

    .chat-form input {
      flex: 1;
      background: rgba(0, 200, 150, 0.05);
      border: 1px solid rgba(0, 200, 150, 0.12);
      border-radius: 8px;
      color: #d6efea;
      padding: 8px 10px;
      font-size: 12px;
      outline: none;
    }

    .chat-form input:focus {
      border-color: #00c896;
    }

    .chat-form button {
      background: rgba(0, 200, 150, 0.08);
      border: 1px solid rgba(0, 200, 150, 0.18);
      color: #00c896;
      padding: 8px 11px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 14px;
    }

    .chat-form button:hover {
      background: rgba(0, 200, 150, 0.18);
    }

    #btn-mic.ouvindo {
      background: rgba(255, 80, 80, 0.2);
      border-color: rgba(255, 80, 80, 0.4);
      color: #ff6b6b;
      animation: pulsar 1s infinite;
    }

    @keyframes pulsar {

      0%,
      100% {
        box-shadow: 0 0 0 0 rgba(255, 80, 80, 0.4)
      }

      50% {
        box-shadow: 0 0 0 6px rgba(255, 80, 80, 0)
      }
    }

    /* ── MAIN ── */
    .main {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      min-width: 0;
      height: 100%;
    }

    /* TOPBAR */
    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 22px;
      background: #091818;
      border-bottom: 1px solid rgba(0, 200, 150, 0.08);
      flex-shrink: 0;
    }

    .mes-nav {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .mes-nav button {
      background: rgba(0, 200, 150, 0.08);
      border: 1px solid rgba(0, 200, 150, 0.15);
      color: #00c896;
      width: 28px;
      height: 28px;
      border-radius: 7px;
      cursor: pointer;
      font-size: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .mes-nav button:hover {
      background: rgba(0, 200, 150, 0.18);
    }

    #mesTitulo {
      font-size: 14px;
      font-weight: 700;
      color: #d6efea;
      min-width: 130px;
      text-align: center;
    }

    #btn-lock {
      background: rgba(0, 200, 150, 0.06);
      border: 1px solid rgba(0, 200, 150, 0.15);
      border-radius: 8px;
      width: 34px;
      height: 34px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 15px;
      transition: all 0.2s;
    }

    #btn-lock:hover {
      background: rgba(0, 200, 150, 0.15);
    }

    #btn-lock.travado {
      background: rgba(220, 50, 50, 0.12);
      border-color: rgba(220, 50, 50, 0.35);
    }

    /* Lock inline (no form panel e no cabeçalho dos cartões) */
    .btn-lock-inline {
      background: rgba(0, 200, 150, 0.06);
      border: 1px solid rgba(0, 200, 150, 0.2);
      border-radius: 7px;
      width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 14px;
      color: #7ae8c8;
      transition: all 0.2s;
      flex-shrink: 0;
    }
    .btn-lock-inline:hover { background: rgba(0, 200, 150, 0.15); }
    .btn-lock-inline.travado {
      background: rgba(220, 50, 50, 0.12);
      border-color: rgba(220, 50, 50, 0.35);
      color: #fca5a5;
    }

    /* Cartões bloqueados (lock independente) */
    body.locked-cc .cartao-acoes { display: none !important; }
    body.locked-cc .cartao-acao-guard { pointer-events: none !important; opacity: 0.25 !important; }

    .topbar-title {
      font-size: 13px;
      color: #6aabab;
      font-weight: 500;
    }

    /* CONTENT */
    .content {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 18px 22px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      min-height: 0;
    }

    /* ── TOP GRID ── */
    .top-grid {
      display: flex;
      gap: 14px;
      min-width: 0;
      overflow: visible;
      align-items: stretch;
    }

    /* Date/Time card */
    .dt-card {
      background: #0e2222;
      border: 1px solid rgba(0, 200, 150, 0.1);
      border-radius: 16px;
      padding: 18px 22px;
      min-width: 260px;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      transition: opacity 0.3s, transform 0.3s;
    }

    .dt-card.oculto {
      display: none;
    }

    #btn-clock.oculto {
      opacity: 0.3;
    }

    .dt-month {
      font-size: 20px;
      font-weight: 700;
      color: #d6efea;
    }

    .dt-time {
      font-size: 38px;
      font-weight: 700;
      color: #00c896;
      letter-spacing: 3px;
      font-variant-numeric: tabular-nums;
    }

    .week-row {
      display: flex;
      gap: 5px;
      margin-top: 10px;
    }

    .wd {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
    }

    .wd-label {
      font-size: 10px;
      color: #6aabab;
      text-transform: uppercase;
    }

    .wd-num {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 600;
      color: #8abcbc;
    }

    .wd-num.hoje {
      background: #00c896;
      color: #031818;
    }

    /* Summary + welcome */
    .right-top {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-width: 0;
    }

    .meta-dash-card {
      background: rgba(0,200,150,0.05);
      border: 1px solid rgba(0,200,150,0.12);
      border-radius: 10px;
      padding: 10px 14px;
      min-width: 160px;
      max-width: 200px;
      flex: 1;
      cursor: pointer;
      transition: border-color .2s;
    }
    .meta-dash-card:hover { border-color: rgba(0,200,150,0.3); }
    .meta-dash-icon { color: #00c896; }

    .s-cards {
      display: flex;
      gap: 10px;
      min-width: 0;
      flex-wrap: wrap;
      overflow: visible;
      align-self: stretch;
      align-items: stretch;
    }

    .s-card {
      background: #0e2222;
      border: 1px solid rgba(0, 200, 150, 0.08);
      border-radius: 13px;
      padding: 10px 16px;
      flex: 1;
      min-width: 120px;
      min-height: 90px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
    }

    .s-card-5030 {
      border-color: rgba(0,200,150,0.15);
      transition: border-color .2s, background .2s;
    }
    .s-card-5030:hover {
      border-color: rgba(0,200,150,0.35);
      background: #0e2626;
    }

    .s-card .sc-label {
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: #6aabab;
      margin-bottom: 7px;
    }

    .s-card .sc-val {
      font-size: 17px;
      font-weight: 700;
    }

    .sc-val.receita {
      color: #00c896;
    }

    .sc-val.despesa {
      color: #ff6b6b;
    }

    .sc-val.saldo {
      color: #63d4e8;
    }

    .sc-val.neutro {
      color: #d6efea;
    }

    .bottom-cards {
      display: flex;
      gap: 10px;
      flex: 1;
    }

    .welcome-card {
      background: linear-gradient(135deg, #00c896 0%, #007050 55%, #0a2828 100%);
      border-radius: 13px;
      padding: 16px 18px;
      flex: 1;
      position: relative;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .welcome-card::before {
      content: '';
      position: absolute;
      right: -15px;
      top: -15px;
      width: 90px;
      height: 90px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.07);
    }

    .welcome-card::after {
      content: '';
      position: absolute;
      right: 25px;
      bottom: -25px;
      width: 70px;
      height: 70px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.04);
    }

    .wc-title {
      font-size: 14px;
      font-weight: 700;
      color: #fff;
    }

    .wc-sub {
      font-size: 12px;
      color: rgba(255, 255, 255, 0.75);
      margin-top: 3px;
    }

    .wc-btn {
      background: rgba(255, 255, 255, 0.18);
      border: 1px solid rgba(255, 255, 255, 0.3);
      color: #fff;
      padding: 5px 12px;
      border-radius: 8px;
      font-size: 12px;
      cursor: pointer;
      width: fit-content;
      margin-top: 8px;
    }

    .wc-btn:hover {
      background: rgba(255, 255, 255, 0.28);
    }

    /* ── ACCOUNTS + CARDS ROW ── */
    .ac-row {
      display: flex;
      gap: 14px;
      min-width: 0;
      overflow: hidden;
    }

    .panel {
      background: #0e2222;
      border: 1px solid rgba(0, 200, 150, 0.08);
      border-radius: 14px;
      padding: 15px 17px;
      min-width: 380px;
    }

    .panel-hdr {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }

    .panel-hdr-title {
      font-size: 14px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: #6aabab;
    }

    .btn-padd {
      background: rgba(0, 200, 150, 0.08);
      border: 1px solid rgba(0, 200, 150, 0.15);
      color: #00c896;
      width: 19px;
      height: 19px;
      border-radius: 5px;
      cursor: pointer;
      font-size: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .btn-padd:hover {
      background: rgba(0, 200, 150, 0.2);
    }

    .c-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 5px 0;
      border-bottom: 1px solid rgba(0, 200, 150, 0.04);
      font-size: 12px;
    }

    .c-row:last-child {
      border-bottom: none;
    }

    .c-row .cn {
      color: #9ac8c8;
    }

    .c-row .cv {
      color: #00c896;
      font-weight: 600;
    }

    .c-total {
      display: flex;
      justify-content: space-between;
      padding-top: 7px;
      margin-top: 3px;
      border-top: 1px solid rgba(0, 200, 150, 0.1);
      font-size: 12px;
      font-weight: 700;
    }

    .c-total span:last-child {
      color: #63d4e8;
    }

    /* Cartão item */
    #lista-cartoes {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
    }

    .cc-item {
      background: rgba(0, 200, 150, 0.04);
      border: 1px solid rgba(0, 200, 150, 0.08);
      border-radius: 9px;
      padding: 9px 11px;
      position: relative;
      flex: 1;
      min-width: 200px;
      max-width: 270px;
    }

    #panel-cartoes {
      align-self: flex-start;
    }

    .cc-nome {
      font-size: 12px;
      font-weight: 600;
      color: #b0ddd6;
      margin-bottom: 5px;
      padding-right: 42px;
    }

    .cc-linha {
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      color: #6aabab;
      margin-top: 2px;
    }

    .cc-linha span:last-child {
      color: #9abcbc;
    }

    .cc-bar {
      height: 3px;
      background: rgba(0, 200, 150, 0.1);
      border-radius: 2px;
      margin-top: 5px;
      overflow: hidden;
    }

    .cc-bar-fill {
      height: 100%;
      background: #00c896;
      border-radius: 2px;
      transition: width 0.3s;
    }

    .cc-bar-fill.alerta {
      background: #ff6b6b;
    }

    .cartao-acoes {
      position: absolute;
      top: 7px;
      right: 8px;
      display: flex;
      gap: 2px;
    }

    .cartao-acoes button {
      background: none;
      border: none;
      cursor: pointer;
      font-size: 11px;
      color: #6a9898;
      padding: 2px 3px;
      border-radius: 3px;
    }

    .cartao-acoes button:hover {
      background: rgba(0, 200, 150, 0.1);
      color: #00c896;
    }

    .del-cartao:hover {
      color: #ff6b6b !important;
    }

    /* ── FORM ── */
    .form-panel {
      background: #112d2d;
      border: 1px solid rgba(0, 200, 150, 0.18);
      border-radius: 14px;
      padding: 15px 17px;
      min-width: 380px;
      overflow: hidden;
    }

    #form-wrap {
      transition: opacity 0.2s;
    }

    #form-wrap.bloqueado {
      opacity: 0.25;
      pointer-events: none;
    }

    .form-title {
      font-size: 14px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: #6aabab;
      margin-bottom: 10px;
    }

    .form-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: flex-end;
    }

    .f-campo {
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex: 1;
      min-width: 100px;
    }

    .f-campo label {
      font-size: 11px;
      color: #7abcbc;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .f-campo input,
    .f-campo select {
      background: rgba(0, 200, 150, 0.08);
      border: 1px solid rgba(0, 200, 150, 0.22);
      border-radius: 8px;
      color: #d6efea;
      padding: 7px 9px;
      font-size: 12px;
      outline: none;
      transition: border-color 0.2s;
      width: 100%;
    }

    .f-campo input:focus,
    .f-campo select:focus {
      border-color: #00c896;
    }

    select option {
      background: #0d2020;
      color: #d6efea;
    }

    .btn-receita {
      background: linear-gradient(135deg, #00c896, #009070);
      border: none;
      color: #031818;
      padding: 7px 14px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 11px;
      font-weight: 700;
      white-space: nowrap;
      align-self: flex-end;
    }

    .btn-despesa {
      background: linear-gradient(135deg, #ff6b6b, #cc2828);
      border: none;
      color: #fff;
      padding: 7px 14px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 11px;
      font-weight: 700;
      white-space: nowrap;
      align-self: flex-end;
    }

    .btn-receita:hover,
    .btn-despesa:hover {
      opacity: 0.85;
    }

    /* ── TABLES ── */
    .tables-row {
      display: flex;
      gap: 14px;
      flex: 1;
      min-height: 220px;
      min-width: 0;
      overflow: hidden;
    }

    .t-col {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 380px;
    }

    .t-header {
      padding: 11px 16px;
      border-radius: 11px 11px 0 0;
      font-size: 15px;
      font-weight: 800;
      letter-spacing: 0.3px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .t-header.ent {
      background: rgba(0, 200, 150, 0.1);
      color: #00c896;
      border: 1px solid rgba(0, 200, 150, 0.14);
      border-bottom: none;
    }

    .t-header.sai {
      background: rgba(255, 107, 107, 0.1);
      color: #ff6b6b;
      border: 1px solid rgba(255, 107, 107, 0.14);
      border-bottom: none;
    }

    .t-wrap {
      background: #0e2222;
      border-radius: 0 0 11px 11px;
      border: 1px solid rgba(0, 200, 150, 0.08);
      overflow: auto;
      flex: 1;
    }

    .t-wrap.sai-wrap {
      border-color: rgba(255, 107, 107, 0.08);
    }

    table {
      width: 100%;
      border-collapse: collapse;
    }

    thead tr {
      background: rgba(0, 0, 0, 0.25);
    }

    thead th {
      padding: 7px 9px;
      font-size: 11px;
      text-transform: uppercase;
      color: #6aabab;
      text-align: left;
      letter-spacing: 0.5px;
      white-space: nowrap;
    }

    thead th.th-sort {
      cursor: pointer;
      user-select: none;
    }
    thead th.th-sort:hover { color: #d6efea; }
    thead th.th-sort .sort-arrow {
      display: inline-block;
      margin-left: 4px;
      font-size: 9px;
      opacity: 0.35;
      transition: opacity .15s;
    }
    thead th.th-sort:hover .sort-arrow { opacity: 0.7; }
    thead th.th-sort.sort-asc .sort-arrow,
    thead th.th-sort.sort-desc .sort-arrow { opacity: 1; color: #00c896; }

    tbody tr {
      border-top: 1px solid rgba(0, 200, 150, 0.04);
      transition: background 0.15s;
    }

    tbody tr:hover {
      background: rgba(0, 200, 150, 0.03);
    }

    tbody td {
      padding: 7px 9px;
      font-size: 12px;
      color: #a0cccc;
    }

    #totais-saidas {
      background: #0e2222;
      border: 1px solid rgba(255, 107, 107, 0.12);
      border-radius: 10px;
      margin-top: 8px;
      overflow: hidden;
      flex-shrink: 0;
    }

    #totais-saidas:empty {
      display: none;
    }

    .tot-perfil {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 6px 12px;
      font-size: 12px;
      color: #6aabab;
      border-bottom: 1px solid rgba(0, 200, 150, 0.05);
    }

    .tot-perfil:last-of-type {
      border-bottom: none;
    }

    .tot-perfil .tp-nome {
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .tot-perfil .tp-val {
      color: #ff6b6b;
      font-weight: 600;
    }

    .tot-geral {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 7px 12px;
      font-size: 12px;
      font-weight: 700;
      color: #d6efea;
      border-top: 1px solid rgba(255, 107, 107, 0.15);
      background: rgba(255, 107, 107, 0.04);
    }

    .tot-geral .tg-val {
      color: #ff6b6b;
    }

    .badge-perfil {
      display: inline-block;
      padding: 1px 5px;
      border-radius: 7px;
      font-size: 11px;
      font-weight: 600;
      background: rgba(0, 200, 150, 0.1);
      color: #00c896;
      margin-left: 3px;
    }

    .badge-parc {
      display: inline-block;
      padding: 1px 6px;
      border-radius: 7px;
      font-size: 10px;
      font-weight: 700;
      background: rgba(245,158,11,0.12);
      color: #f59e0b;
      margin-left: 4px;
      cursor: pointer;
      border: 1px solid rgba(245,158,11,0.2);
    }
    .badge-parc:hover { background: rgba(245,158,11,0.22); }

    /* Data: versão longa (desktop) e curta (mobile, trocado via media query) */
    .dt-desk { display: inline; }
    .dt-mob  { display: none; }

    .acoes {
      display: flex;
      gap: 2px;
    }

    .btn-acao {
      background: none;
      border: none;
      cursor: pointer;
      font-size: 12px;
      padding: 2px 3px;
      border-radius: 4px;
      opacity: 0.5;
      transition: opacity 0.15s;
    }

    .btn-acao:hover {
      opacity: 1;
    }

    .btn-acao.editar {
      color: #63d4e8;
    }

    .btn-acao.duplicar {
      color: #b794f4;
    }

    .btn-acao.deletar {
      color: #7a9898;
    }

    .btn-acao.deletar:hover {
      color: #ff6b6b;
    }

    .acoes.bloqueado .btn-acao {
      opacity: 0.15;
      pointer-events: none;
    }

    /* ── MODAIS ── */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.75);
      z-index: 100;
      align-items: center;
      justify-content: center;
    }

    .modal-overlay.aberto {
      display: flex;
    }

    .modal {
      background: #0e2525;
      border: 1px solid rgba(0, 200, 150, 0.14);
      border-radius: 16px;
      padding: 22px;
      width: 500px;
      max-width: 95vw;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .modal h2 {
      font-size: 14px;
      color: #d6efea;
    }

    .modal-campos {
      display: flex;
      flex-direction: column;
      gap: 11px;
    }

    .modal-campo {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .modal-campo label {
      font-size: 11px;
      color: #6aabab;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .modal-campo input,
    .modal-campo select {
      background: rgba(0, 200, 150, 0.06);
      border: 1px solid rgba(0, 200, 150, 0.22);
      border-radius: 8px;
      color: #d6efea;
      padding: 8px 11px;
      font-size: 13px;
      outline: none;
    }

    .modal-campo input:focus,
    .modal-campo select:focus {
      border-color: #00c896;
    }

    .modal-linha {
      display: flex;
      gap: 10px;
    }

    .modal-linha .modal-campo {
      flex: 1;
    }

    .modal-botoes {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
    }

    .btn-cancelar {
      background: rgba(0, 0, 0, 0.3);
      border: 1px solid rgba(0, 200, 150, 0.1);
      color: #8abcbc;
      padding: 8px 18px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 12px;
    }

    .btn-cancelar:hover {
      color: #d6efea;
    }

    .btn-salvar {
      background: linear-gradient(135deg, #00c896, #009070);
      border: none;
      color: #031818;
      padding: 8px 18px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 12px;
      font-weight: 700;
    }

    .btn-salvar:hover {
      opacity: 0.85;
    }

    /* ── DIÁLOGO CUSTOMIZADO ── */
    #dialogo-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.65);z-index:9999;align-items:center;justify-content:center;backdrop-filter:blur(4px);}
    #dialogo-overlay.aberto{display:flex;}
    #dialogo-box{background:#0e2525;border:1px solid rgba(0,200,150,0.18);border-radius:16px;padding:26px 28px;min-width:300px;max-width:400px;width:90vw;box-shadow:0 24px 64px rgba(0,0,0,0.6);display:flex;flex-direction:column;gap:18px;animation:dialogo-in .18s ease;}
    @keyframes dialogo-in{from{opacity:0;transform:scale(.94) translateY(-8px)}to{opacity:1;transform:none}}
    @keyframes spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}
    #dialogo-titulo{font-size:13px;font-weight:600;color:#d6efea;}
    #dialogo-msg{font-size:13px;color:#9abcbc;line-height:1.55;}
    #dialogo-input{width:100%;background:rgba(0,200,150,0.08);border:1px solid rgba(0,200,150,0.22);border-radius:8px;color:#d6efea;padding:9px 11px;font-size:13px;outline:none;font-family:inherit;}
    #dialogo-input:focus{border-color:#00c896;}
    #dialogo-btns{display:flex;gap:8px;justify-content:flex-end;}

    /* ── LAYOUT DRAG & RESIZE ── */
    .bloco-layout {
      position: relative;
    }

    .grip-drag {
      position: absolute;
      bottom: 4px;
      right: 6px;
      width: auto;
      height: auto;
      cursor: grab;
      color: rgba(0, 200, 150, .45);
      font-size: 13px;
      opacity: 0;
      transition: opacity .15s;
      z-index: 15;
      padding: 4px 6px;
      user-select: none;
      line-height: 1;
      border-radius: 4px;
    }

    /* grip-drag hover gerenciado pelo CSS injetado em app.js */

    .bloco-layout.layout-drag {
      opacity: .2;
    }

    .grip-h {
      position: absolute;
      top: 0;
      bottom: 0;
      right: -5px;
      width: 10px;
      cursor: col-resize;
      z-index: 20;
      opacity: 0;
      transition: opacity .2s;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .grip-h::before {
      content: '';
      width: 3px;
      height: 36px;
      background: rgba(0, 200, 150, .35);
      border-radius: 2px;
      transition: background .15s;
    }

    .grip-h:hover::before {
      background: rgba(0, 200, 150, .9);
    }

    /* grip-h hover gerenciado pelo CSS injetado em app.js */

    .grip-v {
      height: 10px;
      cursor: row-resize;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      z-index: 15;
      margin: -2px 0;
    }

    .grip-v::before {
      content: '';
      width: 60px;
      height: 3px;
      background: rgba(0, 200, 150, .3);
      border-radius: 2px;
      opacity: 0;
      transition: opacity .2s;
    }

    .grip-v:hover::before {
      opacity: 1;
    }

    body.lres-h * {
      cursor: col-resize !important;
      user-select: none !important;
    }

    body.lres-v * {
      cursor: row-resize !important;
      user-select: none !important;
    }

    /* ── PLANO DE FUNDO ── */
    #bg-overlay {
      position: fixed;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      background: rgba(0, 0, 0, 0.52);
      display: none;
    }

    body.tem-bg {
      background-size: cover;
      background-position: center;
      background-attachment: fixed;
    }

    body.tem-bg #bg-overlay {
      display: block;
    }

    body.tem-bg .sidebar,
    body.tem-bg .main {
      position: relative;
      z-index: 1;
    }

    body.tem-bg .topbar,
    body.tem-bg .sidebar {
      background: rgba(9, 24, 24, 0.88);
      backdrop-filter: blur(8px);
    }

    body.tem-bg .panel,
    body.tem-bg .form-panel,
    body.tem-bg .dt-card,
    body.tem-bg .s-card,
    body.tem-bg .t-wrap,
    body.tem-bg .modal,
    body.tem-bg .chat-overlay {
      background: rgba(14, 34, 34, 0.85);
      backdrop-filter: blur(6px);
    }

    .sb-item-bg-remove {
      color: #ff6b6b !important;
      font-size: 11px;
    }

    .sb-item-bg-remove:hover {
      color: #ff9999 !important;
    }

    /* ── PALETA PANEL ── */
    #palette-panel {
      position: fixed;
      top: 58px;
      right: 16px;
      background: #0e2525;
      border: 1px solid rgba(0, 200, 150, 0.18);
      border-radius: 14px;
      padding: 14px;
      z-index: 300;
      display: none;
      flex-direction: column;
      gap: 10px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    }

    #palette-panel.aberto {
      display: flex;
    }

    .pal-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
    }

    .pal-section-label {
      font-size: 10px;
      color: rgba(0, 200, 150, 0.55);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      padding-bottom: 2px;
      border-bottom: 1px solid rgba(0, 200, 150, 0.1);
    }

    .pal-logo-row {
      display: flex;
      gap: 10px;
      justify-content: center;
      align-items: center;
      padding: 4px 0;
    }

    .pal-logo-swatch {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      cursor: pointer;
      border: 2px solid transparent;
      transition: transform .15s, border-color .15s, box-shadow .15s;
      flex-shrink: 0;
    }

    .pal-logo-swatch:hover { transform: scale(1.2); }
    .pal-logo-swatch.ativo { border-color: rgba(255,255,255,0.75); transform: scale(1.15); }

    .pal-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      padding: 8px 6px;
      border-radius: 10px;
      cursor: pointer;
      border: 2px solid transparent;
      transition: all 0.15s;
    }

    .pal-item:hover {
      background: rgba(255, 255, 255, 0.05);
    }

    .pal-item.ativa {
      background: rgba(255, 255, 255, 0.07);
    }

    .pal-swatch {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      border: 2px solid rgba(255, 255, 255, 0.15);
    }

    .pal-nome {
      font-size: 10px;
      color: #6aabab;
      text-align: center;
      white-space: nowrap;
    }

    #btn-palette {
      background: rgba(0, 200, 150, 0.06);
      border: 1px solid rgba(0, 200, 150, 0.15);
      border-radius: 8px;
      width: 34px;
      height: 34px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 15px;
      transition: all 0.2s;
    }

    #btn-palette:hover {
      background: rgba(0, 200, 150, 0.15);
    }

    /* ── MODO INATIVO ── */
    .sidebar,
    .main,
    .chat-overlay {
      transition: opacity 1.5s ease;
    }

    body.inativo .sidebar,
    body.inativo .main {
      opacity: 0.04;
      pointer-events: none;
    }

    /* ── MODO PRIVADO ── */
    .privado .sc-val,
    .privado .si-val,
    .privado .sb-total span:last-child,
    .privado .sb-perfil-card .sobrou-pos,
    .privado .sb-perfil-card .sobrou-neg,
    .privado .sb-perfil-card div[style*="color:#00c896"],
    .privado .sb-perfil-card div[style*="color:#ff6b6b"],
    .privado .tp-val,
    .privado .tg-val,
    .privado tbody td,
    .privado .cc-item,
    .privado .cc-fatura-val,
    .privado #saldo-mes-cred,
    .privado .dt-time {
      filter: blur(7px);
      user-select: none;
      transition: filter .25s;
    }
    .privado .sc-val:hover,
    .privado .si-val:hover,
    .privado .sb-total span:last-child:hover,
    .privado tbody tr:hover td,
    .privado .cc-item:hover {
      filter: blur(0px);
    }
    #btn-privado.ativo {
      background: rgba(168,85,247,0.15) !important;
      border-color: rgba(168,85,247,0.4) !important;
    }

    /* ══════════════════════════════════════
       RESPONSIVO — MOBILE (≤ 768px)
    ══════════════════════════════════════ */
    @media (max-width: 768px) {

      /* ── Touch scroll fix ──
         body/main têm overflow:hidden (necessário pro layout desktop).
         No mobile, o scroll precisa viver no .content com altura explícita.
         iOS Safari só reconhece touch-scroll em containers com height definido + overflow-y:scroll
      ── */
      body {
        position: fixed !important;   /* evita rubber-band no iOS */
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
      }
      .main {
        height: 100dvh !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
      }
      .content {
        /* Flex comprime filhos — troca pra block no mobile */
        display: block !important;
        height: calc(100dvh - 54px - 60px) !important;
        max-height: calc(100dvh - 54px - 60px) !important;
        flex: none !important;
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-y: contain !important;
        touch-action: pan-y !important;
      }

      /* Remove atraso de 300ms em todos os elementos interativos */
      a, button, [onclick], select, input,
      .mob-tab, .mob-cat-item, .mob-sheet-campo,
      .sb-item, .btn-acao, tbody tr, .s-card {
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
      }

      /* ── Base: sem transparência ── */
      *, *::before, *::after {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
      }
      .sidebar, .topbar                           { background: #091818 !important; }
      .panel, .dt-card, .s-card, .form-panel,
      .t-wrap, .cc-item, .chat-header,
      .sb-chat-inline, #totais-saidas,
      #dialogo-box, #rec-box                      { background: #0e2222 !important; }
      body.tem-bg .topbar, body.tem-bg .sidebar   { background: #091818 !important; }

      /* ── Layout raiz: coluna única ── */
      body {
        flex-direction: column !important;
        overflow: hidden !important;
        height: 100dvh !important;
      }

      /* ── Sidebar: drawer off-canvas ── */
      .sidebar {
        display: flex !important;
        position: fixed !important;
        top: 0; left: 0; bottom: 0 !important;
        height: 100% !important;
        width: 82vw !important;
        max-width: 290px !important;
        transform: translateX(-105%) !important;
        transition: transform .28s cubic-bezier(.4,0,.2,1) !important;
        z-index: 300 !important;
        box-shadow: 4px 0 24px rgba(0,0,0,0.5);
        overflow-y: auto !important;
      }
      .sidebar.mob-aberta {
        transform: translateX(0) !important;
      }
      .sidebar-grip { display: none !important; }

      /* ── Main: ocupa tudo ── */
      .main {
        width: 100% !important;
        height: 100dvh !important;
        flex: 1 !important;
      }

      /* ── Sidebar mobile: ações visíveis, chat oculto ── */
      .sb-acoes-mob { display: block !important; }
      .sb-chat-inline { display: none !important; }

      /* ── Overlay escuro atrás da sidebar ── */
      #mob-overlay {
        display: none;
        position: fixed; inset: 0;
        background: rgba(0,0,0,0.55);
        z-index: 299;
        touch-action: none;
      }
      #mob-overlay.ativo { display: block; }

      /* ── Topbar mobile: hamburguer | [flex-1 centrado: mês] | relatório + engrenagem ── */
      .topbar {
        padding: 0 8px !important;
        gap: 4px !important;
        flex-shrink: 0 !important;
        overflow: hidden !important;
        height: 54px !important;
        min-height: 54px !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
      }
      .topbar-title { display: none !important; }
      #btn-hamburger { display: flex !important; flex-shrink: 0 !important; }
      /* Mês ocupa o espaço central e centraliza */
      .mes-nav {
        flex: 1 !important;
        justify-content: center !important;
      }
      #mesTitulo { font-size: 14px !important; }
      /* Esconde todos os botões da direita — mostra só relatório e engrenagem */
      .topbar > div > button { display: none !important; }
      #btn-mes-prev, #btn-mes-next { display: flex !important; width: 34px !important; height: 34px !important; pointer-events: auto !important; }
      #btn-relatorio-mob { display: flex !important; }
      #btn-config-mob    { display: flex !important; }

      /* ── Content: padding mobile ── */
      .content {
        padding: 10px !important;
        gap: 10px !important;
      }

      /* ── Relógio: oculto ── */
      .dt-card { display: none !important; }
      .top-grid { flex-direction: column !important; }

      /* ── Cards de resumo: 2×2 ── */
      .s-cards {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
      }
      .s-card {
        padding: 12px !important;
        border-radius: 12px !important;
      }
      .sc-label { font-size: 11px !important; }
      .sc-val   { font-size: 16px !important; }
      #saldo-mes-cred { font-size: 9px !important; }

      /* ── Painéis: coluna única ── */
      #row-ac {
        flex-direction: column !important;
        gap: 10px !important;
      }
      /* Form de novo lançamento oculto no mobile — usa o FAB + bottom sheet */
      .form-panel { display: none !important; }
      .form-panel {
        min-width: unset !important;
        width: 100% !important;
      }
      #panel-cartoes {
        width: 100% !important;
        min-width: unset !important;
        align-self: stretch !important;
      }

      /* ── Form de lançamento ── */
      .f-row {
        flex-wrap: wrap !important;
        gap: 6px !important;
      }
      .f-campo {
        min-width: calc(50% - 4px) !important;
        flex: 1 1 calc(50% - 4px) !important;
      }
      .f-campo input, .f-campo select {
        font-size: 13px !important;
        padding: 8px !important;
      }
      .btn-receita, .btn-despesa {
        flex: 1 !important;
        padding: 10px 8px !important;
        font-size: 13px !important;
      }

      /* ── Cartões de crédito: coluna única ── */
      #lista-cartoes { flex-direction: column !important; }
      .cc-item {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
      }

      /* ── Oculta card 50-30-20 do corpo (abre como sheet) ── */
      #card-5030 { display: none !important; }
      /* Palette panel: z-index acima de tudo em mobile */
      #palette-panel { z-index: 600 !important; top: 60px !important; right: 8px !important; left: 8px !important; width: auto !important; }

      /* ── Cartões de crédito: mais espaço ── */
      #panel-cartoes { margin: 14px 0 !important; }

      /* ── Tabelas: swipe horizontal ── */
      .tables-row {
        position: relative !important;
        overflow: hidden !important;
        flex-direction: row !important;
        gap: 0 !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        margin-left: -10px !important;
        margin-right: -10px !important;
        width: calc(100% + 20px) !important;
      }
      /* Tabs de navegação (injetadas via JS) */
      #mob-table-tabs {
        display: flex;
        position: sticky; top: 0; z-index: 10;
        background: #0e2222;
        border-bottom: 1px solid rgba(0,200,150,0.12);
        margin-bottom: 0;
      }
      .mob-ttab {
        flex: 1; padding: 11px 8px;
        border: none; background: transparent;
        font-size: 13px; font-weight: 700; color: #4a7070;
        cursor: pointer; transition: all .15s;
        touch-action: manipulation;
      }
      .mob-ttab.ativo { color: #00c896; border-bottom: 2px solid #00c896; }
      /* Cada coluna ocupa 100% da largura visível */
      .t-col {
        width: 100vw !important;
        min-width: 100vw !important;
        min-height: unset !important;
        flex-shrink: 0 !important;
        transition: transform 0.3s cubic-bezier(.4,0,.2,1);
        padding: 14px 10px 0 !important;
        box-sizing: border-box !important;
      }
      .t-wrap { overflow-x: auto !important; }
      /* Filtros e seleção: ocultos em mobile (o painel de detalhe substitui) */
      .t-filter-bar { display: none !important; }
      /* Abreviações */
      .th-lbl   { display: none !important; }
      .th-abrev { display: inline !important; }
      table   { min-width: 300px !important; font-size: 12px !important; }
      th, td  { padding: 6px 6px !important; }

      /* ── Botões de ação: menores ── */
      .acoes { gap: 2px !important; }
      .btn-acao {
        padding: 4px 6px !important;
        font-size: 11px !important;
      }

      /* ── Grips de resize: oculta ── */
      .grip-drag, .grip-h, .grip-v { display: none !important; }

      /* ── Modais ── */
      #rec-box {
        width: 96vw !important;
        max-height: 90dvh !important;
        padding: 14px !important;
        border-radius: 12px !important;
      }
      #dialogo-box {
        width: 88vw !important;
        padding: 20px !important;
      }

      /* ── Badge de perfil ── */
      .badge-perfil { font-size: 9px !important; padding: 1px 5px !important; }

      /* ── Bottom Tab Bar ── */
      #mob-tabbar { display: flex !important; }
      .content { padding-bottom: 72px !important; }
      /* Oculta topbar hamburger actions que poluem mobile — mantém só navegação de mês */
      #btn-recorrentes { display: none !important; }

      /* ── Tabelas: header compacto no mobile ── */
      .t-header {
        font-size: 12px !important;
        padding: 8px 10px !important;
        border-radius: 0 !important;
      }

      /* ── Tabelas: sem scroll horizontal — mostra só DT, DESC, VAL ── */
      .t-wrap { overflow-x: hidden !important; }
      table { min-width: unset !important; width: 100% !important; table-layout: fixed !important; }
      /* Checkbox e ações: sempre ocultos */
      .th-cb, td:first-child, th:last-child, td:last-child { display: none !important; }
      /* Entradas: ocultar CAT (col 4) — mostra DT(2) DESC(3) VAL(5) */
      #tabela-entradas td:nth-child(4), #thead-entradas th:nth-child(4) { display: none !important; }
      /* Saídas: ocultar CAT(4) e CT(5) — mostra DT(2) DESC(3) VAL(6) */
      #tabela-saidas td:nth-child(4), #thead-saidas th:nth-child(4),
      #tabela-saidas td:nth-child(5), #thead-saidas th:nth-child(5) { display: none !important; }
      /* Larguras: DT=44px fixo, DESC=auto, VAL=92px fixo */
      #thead-entradas th:nth-child(2), #tabela-entradas td:nth-child(2) { width: 44px !important; }
      #thead-entradas th:nth-child(5), #tabela-entradas td:nth-child(5) { width: 92px !important; text-align: right !important; padding-right: 10px !important; }
      #thead-saidas th:nth-child(2),   #tabela-saidas td:nth-child(2)   { width: 44px !important; }
      #thead-saidas th:nth-child(6),   #tabela-saidas td:nth-child(6)   { width: 92px !important; text-align: right !important; padding-right: 10px !important; }
      /* Trunca texto longo */
      td { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
      /* Linhas clicáveis em mobile */
      #tabela-entradas tr, #tabela-saidas tr { cursor: pointer !important; }
      /* Data: oculta versão longa, mostra curta (dd/mm) */
      .dt-desk { display: none !important; }
      .dt-mob  { display: inline !important; }

      /* ── Cadeado: quando desbloqueado mostra coluna de ações no mobile ── */
      body.tabelas-desbloqueadas td:last-child,
      body.tabelas-desbloqueadas th:last-child {
        display: table-cell !important;
        width: auto !important;
      }
      body.tabelas-desbloqueadas .acoes { gap: 4px !important; }
      body.tabelas-desbloqueadas .btn-acao {
        min-height: 40px !important; min-width: 36px !important;
        padding: 6px 8px !important; font-size: 14px !important;
      }

      /* ── Modais: max-height + scroll interno ── */
      .modal {
        max-height: 90dvh !important;
        overflow-y: auto !important;
        width: 95vw !important;
        max-width: 95vw !important;
      }
      /* Inputs dos modais: font-size 16px obrigatório pra não dar zoom no iOS */
      .modal-campo input,
      .modal-campo select,
      input[type="text"], input[type="number"], input[type="date"],
      input[type="email"], input[type="tel"], input[type="password"],
      select {
        font-size: 16px !important;
      }
      /* Orçamento e 50-30-20: dvh (não fica atrás do teclado virtual) */
      #modal-orcamento > div, #modal-5030 > div, #config-box, #rec-box {
        max-height: 90dvh !important;
      }

      /* ── Julius chat: input 16px (evita zoom) ── */
      .chat-form input, #chat-input { font-size: 16px !important; }

      /* ── Julius panel: alinha com tab bar + safe area ── */
      #julius-panel {
        bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
        height: calc(70dvh - env(safe-area-inset-bottom, 0px)) !important;
      }

      /* ── s-card "Guardado": remove min-width fixo ── */
      #card-poupanca { min-width: unset !important; }
    }

    /* ════════════════════════════════════════════════
       MOBILE COMPONENTS (globais — visíveis só em mobile via display:none padrão)
    ════════════════════════════════════════════════ */

    /* Bottom Tab Bar */
    #mob-table-tabs { display: none; }
    .th-abrev { display: none; }

    #mob-tabbar {
      display: none;
      position: fixed;
      bottom: 0; left: 0; right: 0;
      height: 60px;
      background: #0e2525;
      border-top: 1px solid rgba(0,200,150,0.12);
      z-index: 250;
      align-items: center;
      justify-content: space-around;
      padding: 0 4px;
      padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .mob-tab {
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      gap: 2px; flex: 1; height: 100%;
      cursor: pointer; color: #4a7070;
      font-size: 10px; font-weight: 500;
      transition: color 0.15s;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }
    .mob-tab i { font-size: 22px; }
    .mob-tab.ativo { color: #00c896; }
    /* Julius tab SVG: opacidade reduzida quando inativo, normal quando ativo */
    #mob-tab-ia svg { opacity: 0.72; transition: opacity 0.15s; }
    #mob-tab-ia.ativo svg { opacity: 1; }
    /* ── FAB wrapper ── */
    #mob-fab-wrap {
      position: relative;
      display: flex; flex-direction: column;
      align-items: center;
      margin-top: -20px;
      flex-shrink: 0;
      z-index: 10;
    }
    /* Mic icon: começa pequeno/invisível, sobe ao pressionar */
    .mob-fab-mic {
      position: absolute;
      top: 6px;
      pointer-events: none;
      color: #00c896; font-size: 30px;
      transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
      transform: scale(0.6); opacity: 0.15; z-index: 5;
    }
    #mob-fab-wrap.is-pressing .mob-fab-mic {
      transform: scale(1.45) translateY(-34px);
      opacity: 1;
      filter: drop-shadow(0 0 12px rgba(0,200,150,0.85));
    }
    /* Pulse rings */
    #mob-fab-pulses {
      position: absolute;
      top: 0; left: 50%;
      width: 60px; height: 60px;
      transform: translateX(-50%);
      border-radius: 50%;
      pointer-events: none; display: none; z-index: 1;
    }
    #mob-fab-wrap.is-pressing #mob-fab-pulses { display: block; }
    .mob-fab-pulse-ring {
      position: absolute; inset: 0;
      background: rgba(0,200,150,0.3);
      border-radius: 50%;
      animation: mob-pulse-ring 1.5s cubic-bezier(0.4,0,0.2,1) infinite;
    }
    .mob-fab-pulse-ring:nth-child(2) { animation-delay: 0.5s; }
    @keyframes mob-pulse-ring {
      0%   { transform: scale(0.8); opacity: 0.5; }
      100% { transform: scale(2.2); opacity: 0; }
    }
    /* O botão */
    #mob-fab {
      flex-shrink: 0; width: 60px; height: 60px;
      border-radius: 50%;
      background: linear-gradient(135deg, #00c896, #009e78);
      border: none;
      display: flex; align-items: center; justify-content: center;
      font-size: 26px; color: #fff; cursor: pointer;
      box-shadow: 0 4px 18px rgba(0,200,150,0.45);
      transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
      -webkit-tap-highlight-color: transparent;
      position: relative; z-index: 20;
    }
    #mob-fab-wrap.is-pressing #mob-fab {
      transform: scale(0.9);
      box-shadow: 0 0 30px rgba(0,200,150,0.4);
    }
    /* Ícone + dentro do botão */
    .mob-fab-plus { transition: transform 0.3s ease, opacity 0.2s; }
    #mob-fab-wrap.is-pressing .mob-fab-plus { opacity: 0.5; transform: rotate(90deg); }
    /* Label */
    #mob-fab-label {
      font-size: 9px; color: #5a9898;
      margin-top: 3px; font-weight: 500;
      white-space: nowrap; transition: color 0.3s;
    }
    #mob-fab-wrap.is-pressing #mob-fab-label { color: #00c896; }

    /* Sheet overlay */
    #mob-sheet-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.55); z-index: 400;
    }
    #mob-sheet-overlay.aberto { display: block; }

    /* Bottom Sheet principal */
    #mob-sheet {
      position: fixed; bottom: 0; left: 0; right: 0;
      background: #0d2020;
      border-radius: 20px 20px 0 0;
      border-top: 1px solid rgba(0,200,150,0.2);
      z-index: 401;
      transform: translateY(100%);
      transition: transform 0.32s cubic-bezier(.4,0,.2,1);
      padding: 0 16px calc(32px + env(safe-area-inset-bottom, 0px));
      max-height: 92dvh;
      overflow-y: auto;
    }
    #mob-sheet.aberto { transform: translateY(0); }

    .mob-drag-handle {
      width: 40px; height: 4px;
      background: rgba(0,200,150,0.25);
      border-radius: 2px;
      margin: 12px auto 18px;
    }

    /* Toggle despesa/receita */
    .mob-toggle-tipo {
      display: flex;
      background: rgba(0,200,150,0.05);
      border: 1px solid rgba(0,200,150,0.12);
      border-radius: 12px; overflow: hidden;
      margin-bottom: 20px;
    }
    .mob-toggle-tipo button {
      flex: 1; padding: 12px;
      border: none; background: transparent;
      font-size: 15px; font-weight: 700;
      cursor: pointer; transition: all 0.15s;
      color: #5a9898;
      -webkit-tap-highlight-color: transparent;
    }
    .mob-toggle-tipo button.t-ativo-desp {
      background: rgba(255,107,107,0.15); color: #ff8a8a;
    }
    .mob-toggle-tipo button.t-ativo-rec {
      background: rgba(0,200,150,0.15); color: #00c896;
    }

    /* Campo valor */
    #mob-valor-input {
      display: block; width: 100%;
      font-size: 40px; font-weight: 700; color: #d6efea;
      text-align: center;
      background: transparent; border: none;
      border-bottom: 2px solid rgba(0,200,150,0.2);
      padding: 4px 0 12px; margin-bottom: 8px; outline: none;
    }
    #mob-valor-input::placeholder { color: rgba(0,200,150,0.25); }

    /* Campos do sheet */
    .mob-sheet-campo {
      display: flex; align-items: center; gap: 14px;
      padding: 0; min-height: 54px;
      border-bottom: 1px solid rgba(0,200,150,0.06);
      cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .mob-sheet-campo i { font-size: 20px; color: #4a8080; flex-shrink: 0; width: 22px; text-align: center; }
    .mob-sheet-campo-label { font-size: 14px; color: #6a9898; white-space: nowrap; }
    .mob-sheet-campo-val { margin-left: auto; font-size: 14px; font-weight: 600; color: #d6efea; }
    .mob-sheet-campo input, .mob-sheet-campo select {
      background: transparent; border: none; color: #d6efea;
      font-size: 14px; outline: none; text-align: right; flex: 1;
      font-family: inherit;
    }
    .mob-sheet-campo select option { background: #0d2020; }

    /* Botão salvar */
    #mob-btn-salvar {
      display: block; width: 100%; margin-top: 22px;
      padding: 16px; border: none; border-radius: 14px;
      background: linear-gradient(135deg, #00c896, #009e78);
      color: #fff; font-size: 16px; font-weight: 700;
      cursor: pointer; transition: opacity 0.15s;
      letter-spacing: .5px;
    }
    #mob-btn-salvar:disabled { opacity: 0.3; cursor: not-allowed; }

    /* Sheet de categoria */
    #mob-cat-sheet {
      position: fixed; bottom: 0; left: 0; right: 0;
      background: #0a1c1c;
      border-radius: 20px 20px 0 0;
      border-top: 1px solid rgba(0,200,150,0.2);
      z-index: 402;
      transform: translateY(100%);
      transition: transform 0.28s cubic-bezier(.4,0,.2,1);
      padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px));
      max-height: 70dvh; overflow-y: auto;
    }
    #mob-cat-sheet.aberto { transform: translateY(0); }

    .mob-cat-titulo {
      font-size: 11px; font-weight: 700; color: #5a9898;
      letter-spacing: .8px; text-transform: uppercase;
      padding: 14px 0 10px;
    }
    .mob-cat-grid {
      display: grid; grid-template-columns: repeat(4, 1fr);
      gap: 8px; padding-bottom: 8px;
    }
    .mob-cat-item {
      display: flex; flex-direction: column;
      align-items: center; gap: 5px;
      padding: 12px 4px; border-radius: 12px;
      cursor: pointer;
      background: rgba(0,200,150,0.04);
      border: 1.5px solid rgba(0,200,150,0.08);
      transition: all 0.12s;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }
    .mob-cat-item:active { transform: scale(0.93); background: rgba(0,200,150,0.15); }
    .mob-cat-item.mob-cat-sel { background: rgba(0,200,150,0.18); border-color: rgba(0,200,150,0.6); }
    .mob-cat-item i { font-size: 22px; line-height: 1; color: #5a9898; }
    .mob-cat-item.mob-cat-sel i { color: #00c896; }
    .mob-cat-item .cat-nome { font-size: 10px; color: #7abaaa; text-align: center; line-height: 1.2; }
    .mob-cat-item.mob-cat-sel .cat-nome { color: #00c896; }

    /* ── MOBILE IA SHEET ────────────────────────────────────── */
    #mob-ia-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.55); z-index: 400;
    }
    #mob-ia-overlay.aberto { display: block; }
    #mob-ia-sheet {
      position: fixed; bottom: 0; left: 0; right: 0;
      background: #0d2020;
      border-radius: 20px 20px 0 0;
      border-top: 1px solid rgba(0,200,150,0.2);
      z-index: 401;
      transform: translateY(100%);
      transition: transform 0.32s cubic-bezier(.4,0,.2,1);
      padding: 0 16px calc(20px + env(safe-area-inset-bottom, 0px));
      height: 85dvh;
      display: flex; flex-direction: column;
    }
    #mob-ia-sheet.aberto { transform: translateY(0); }
    #mob-ia-msgs {
      flex: 1; overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      display: flex; flex-direction: column; gap: 10px;
      padding: 4px 0 8px;
    }
    #mob-ia-msgs .chat-msg {
      display: flex; flex-direction: column;
      width: 100%; /* garantir que max-width: 82% no bubble seja relativo à largura total */
    }
    #mob-ia-msgs .bubble {
      max-width: 82%; padding: 8px 11px;
      border-radius: 8px; font-size: 13.5px; line-height: 1.5;
      white-space: pre-wrap; word-break: break-word;
    }
    /* Alinha bubble e tempo ao lado correto sem encolher a largura */
    #mob-ia-msgs .chat-msg.user .bubble,
    #mob-ia-msgs .chat-msg.user .tempo { align-self: flex-end; }
    #mob-ia-msgs .chat-msg.ia  .bubble,
    #mob-ia-msgs .chat-msg.ia  .tempo  { align-self: flex-start; }
    #mob-ia-msgs .chat-msg.user .bubble {
      background: rgba(0,200,150,0.18); color: #d6efea;
      border-bottom-right-radius: 2px;
    }
    #mob-ia-msgs .chat-msg.ia .bubble {
      background: rgba(255,255,255,0.05); color: #b0ddd6;
      border-bottom-left-radius: 2px;
    }
    #mob-ia-msgs .tempo { font-size: 10px; color: #4a7070; margin-top: 3px; padding: 0 4px; }

    /* ── JULIUS BALÃO ALEATÓRIO ─────────────────────────────── */
    #mob-julius-balao {
      display: none;
      position: fixed;
      bottom: 76px;
      right: 8px;
      max-width: 230px;
      background: #0d2828;
      border: 1px solid rgba(0,200,150,0.28);
      border-radius: 14px 14px 4px 14px;
      padding: 10px 14px;
      font-size: 13px;
      line-height: 1.45;
      color: #b8e0d4;
      z-index: 450;
      box-shadow: 0 4px 20px rgba(0,0,0,0.45);
      cursor: pointer;
    }
    #mob-julius-balao::after {
      content: '';
      position: absolute;
      bottom: -7px;
      right: 18px;
      width: 0; height: 0;
      border-left: 7px solid transparent;
      border-right: 0px solid transparent;
      border-top: 7px solid rgba(0,200,150,0.28);
    }
    #mob-julius-balao::before {
      content: '';
      position: absolute;
      bottom: -6px;
      right: 19px;
      width: 0; height: 0;
      border-left: 6px solid transparent;
      border-right: 0px solid transparent;
      border-top: 6px solid #0d2828;
      z-index: 1;
    }

    /* ── MOBILE METAS SHEET ──────────────────────────────────── */
    #mob-metas-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.55); z-index: 400;
    }
    #mob-metas-overlay.aberto { display: block; }
    #mob-metas-sheet {
      position: fixed; bottom: 0; left: 0; right: 0;
      background: #0d2020;
      border-radius: 20px 20px 0 0;
      border-top: 1px solid rgba(0,200,150,0.2);
      z-index: 401;
      transform: translateY(100%);
      transition: transform 0.32s cubic-bezier(.4,0,.2,1);
      padding: 0 16px calc(80px + env(safe-area-inset-bottom, 0px));
      height: 75dvh;
      display: flex; flex-direction: column;
      overflow-y: auto; -webkit-overflow-scrolling: touch;
    }
    #mob-metas-sheet.aberto { transform: translateY(0); }
    .mob-meta-item {
      background: rgba(0,200,150,0.05);
      border: 1px solid rgba(0,200,150,0.12);
      border-radius: 14px;
      padding: 14px;
      margin-bottom: 10px;
      display: flex; flex-direction: column; gap: 8px;
    }
    .mob-meta-top { display: flex; align-items: center; gap: 10px; }
    .mob-meta-emoji { font-size: 26px; line-height: 1; flex-shrink: 0; }
    .mob-meta-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
    .mob-meta-nome { font-size: 14px; font-weight: 700; color: #d6efea; }
    .mob-meta-prazo { font-size: 11px; color: #4a8080; }
    .mob-meta-acoes { display: flex; gap: 4px; }
    .mob-meta-acoes button {
      background: none; border: none; color: #4a8080;
      font-size: 18px; cursor: pointer; padding: 4px;
      border-radius: 6px; display: flex; align-items: center;
    }
    .mob-meta-acoes button:active { background: rgba(255,255,255,0.06); }
    .mob-meta-barra-wrap { display: flex; align-items: center; gap: 8px; }
    .mob-meta-barra {
      flex: 1; height: 8px; background: rgba(0,200,150,0.1);
      border-radius: 8px; overflow: hidden;
    }
    .mob-meta-barra-fill { height: 100%; border-radius: 8px; transition: width 0.4s ease; }
    .mob-meta-pct { font-size: 12px; font-weight: 700; color: #7ae8c8; min-width: 32px; text-align: right; }
    .mob-meta-valores { display: flex; gap: 8px; font-size: 12px; color: #7ae8c8; flex-wrap: wrap; }

    /* ── MOBILE 50-30-20 SHEET ──────────────────────────────── */
    #mob-5030-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.55); z-index: 400;
    }
    #mob-5030-overlay.aberto { display: block; }
    #mob-5030-sheet {
      position: fixed; bottom: 0; left: 0; right: 0;
      background: #0d2020;
      border-radius: 20px 20px 0 0;
      border-top: 1px solid rgba(0,200,150,0.2);
      z-index: 401;
      transform: translateY(100%);
      transition: transform 0.32s cubic-bezier(.4,0,.2,1);
      padding: 0 16px calc(80px + env(safe-area-inset-bottom, 0px));
      height: 70dvh;
      display: flex; flex-direction: column;
      overflow-y: auto; -webkit-overflow-scrolling: touch;
    }
    #mob-5030-sheet.aberto { transform: translateY(0); }
    .mob5030-barra-grande {
      display: flex; height: 14px; border-radius: 8px; overflow: hidden; gap: 3px; margin: 14px 0 10px;
    }
    .mob5030-barra-grande div { border-radius: 6px; transition: width .4s; }
    .mob5030-item {
      display: flex; flex-direction: column; gap: 4px;
      background: rgba(0,200,150,0.05); border: 1px solid rgba(0,200,150,0.1);
      border-radius: 14px; padding: 14px 16px; margin-bottom: 10px;
    }
    .mob5030-item-top { display: flex; align-items: center; gap: 10px; }
    .mob5030-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
    .mob5030-label { font-size: 14px; font-weight: 700; color: #d6efea; flex: 1; }
    .mob5030-meta  { font-size: 11px; color: #5a9898; }
    .mob5030-pct   { font-size: 22px; font-weight: 800; }
    .mob5030-val   { font-size: 12px; color: #7abaaa; margin-top: 2px; }
    .mob5030-barra { height: 6px; border-radius: 4px; background: rgba(255,255,255,0.08); margin-top: 8px; overflow: hidden; }
    .mob5030-barra-fill { height: 100%; border-radius: 4px; transition: width .4s; }
    .mob5030-status-ok   { color: #00c896; font-size: 11px; font-weight: 700; }
    .mob5030-status-warn { color: #f59e0b; font-size: 11px; font-weight: 700; }
    .mob5030-status-bad  { color: #ff6b6b; font-size: 11px; font-weight: 700; }

    /* ── AGENTE VISUAL ─────────────────────────────────────── */
    #agente-visual {
      position: fixed; right: 28px; bottom: 28px; z-index: 200;
      display: flex; flex-direction: column; align-items: flex-end;
      pointer-events: none; transition: opacity 0.3s;
    }

    .agente-balao {
      background: rgba(7,18,28,0.97);
      border: 1.5px solid rgba(0,200,150,0.5);
      border-radius: 14px;
      padding: 10px 14px; max-width: 215px; min-width: 70px;
      font-size: 12.5px; color: #d6efea; line-height: 1.45;
      pointer-events: auto; backdrop-filter: blur(14px);
      box-shadow: 0 4px 22px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,200,150,0.1);
      opacity: 0; transform: translateY(7px) scale(0.94);
      transition: opacity 0.22s, transform 0.22s;
      margin-bottom: 22px; position: relative; word-break: break-word;
    }
    /* linha diagonal "/" saindo do balão em direção ao Julius */
    .agente-balao-tail {
      position: absolute;
      bottom: -22px; right: 43px;
      width: 38px; height: 22px;
      pointer-events: none; overflow: visible;
    }
    .agente-balao::after, .agente-balao::before { display: none; }
    .agente-balao.visivel { opacity: 1; transform: translateY(0) scale(1); }

    .agente-face-wrap {
      position: relative; pointer-events: auto; cursor: grab;
      transition: transform 0.2s, filter 0.2s;
      width: 90px; height: 90px;
      animation: ag-glow-pulse 2.8s ease-in-out infinite;
    }
    @keyframes ag-glow-pulse {
      0%, 100% { filter: drop-shadow(0 6px 16px rgba(0,0,0,0.55)) drop-shadow(0 0 10px rgba(0,200,150,0.18)); }
      50%       { filter: drop-shadow(0 6px 16px rgba(0,0,0,0.55)) drop-shadow(0 0 28px rgba(0,200,150,0.52)); }
    }
    .agente-face-wrap:active { cursor: grabbing; }
    .agente-face-wrap:hover {
      animation: none;
      filter: drop-shadow(0 8px 20px rgba(0,0,0,0.5)) drop-shadow(0 0 36px rgba(0,200,150,0.7));
      transform: scale(1.06);
    }
    #agente-visual.ag-dragging { transition: none !important; }
    #agente-visual.ag-dragging .agente-face-wrap {
      animation: none;
      filter: drop-shadow(0 10px 24px rgba(0,200,150,0.5));
      transform: scale(1.05); cursor: grabbing !important;
    }
    .agente-face-wrap svg { width: 90px; height: 90px; }

    @keyframes ag-shake {
      0%,100%{transform:rotate(0)} 20%{transform:rotate(-9deg)}
      40%{transform:rotate(9deg)} 65%{transform:rotate(-5deg)}
      82%{transform:rotate(5deg)}
    }
    @keyframes ag-bounce {
      0%,100%{transform:translateY(0)} 35%{transform:translateY(-10px)}
      65%{transform:translateY(-5px)}
    }
    @keyframes ag-pulse {
      0%,100%{transform:scale(1)} 50%{transform:scale(1.07)}
    }
    @keyframes ag-blink {
      0%,85%,100%{transform:scaleY(1)} 91%{transform:scaleY(0.06)}
    }
    .agente-face-wrap.af-shake { animation: ag-shake 0.48s ease; }
    .agente-face-wrap.af-bounce { animation: ag-bounce 0.55s ease; }
    .agente-face-wrap.af-pulse  { animation: ag-pulse 0.7s ease; }
    #julius-tab-svg.af-shake  { animation: ag-shake 0.48s ease; }
    #julius-tab-svg.af-bounce { animation: ag-bounce 0.55s ease; }
    #julius-tab-svg.af-pulse  { animation: ag-pulse 0.7s ease; }

    /* EconomizaVoice — barra de ondas de gravação */
    .voice-bar {
      width: 4px;
      background: #ef4444;
      border-radius: 2px;
      animation: voice-wave 0.7s ease-in-out infinite;
    }
    .voice-bar:nth-child(1) { animation-delay: 0s;    }
    .voice-bar:nth-child(2) { animation-delay: 0.12s; }
    .voice-bar:nth-child(3) { animation-delay: 0.24s; }
    .voice-bar:nth-child(4) { animation-delay: 0.36s; }
    .voice-bar:nth-child(5) { animation-delay: 0.12s; }
    .voice-bar:nth-child(6) { animation-delay: 0s;    }
    @keyframes voice-wave {
      0%, 100% { height: 5px;  opacity: .5; }
      50%       { height: 22px; opacity: 1;  }
    }
    @keyframes pulse-rec {
      0%, 100% { opacity: 1;   transform: scale(1);    }
      50%       { opacity: 0.3; transform: scale(0.85); }
    }

    .agente-olhos-g {
      animation: ag-blink 3.8s ease-in-out infinite;
      transform-origin: 50px 48px;
    }
    @media (max-width: 768px) {
      /* Agente flutuante oculto no mobile — aparece estático no tab bar */
      #agente-visual { display: none !important; }
      /* Julius panel menor no mobile */
      #julius-panel {
        width: calc(100vw - 24px) !important;
        height: 70vh !important;
        right: 12px !important;
        left: 12px !important;
        top: auto !important;
        bottom: 80px !important;
      }
      /* Cabeça menor no mobile */
      #julius-face-svg { width: 72px !important; height: 72px !important; }
    }
    /* Agente externo some quando Julius panel está aberto */
    body.julius-aberto #agente-visual { opacity: 0; pointer-events: none; transition: opacity .2s; }

    /* ── FILTROS & MULTI-SELECT ──────────────────────────────── */
    .t-filter-bar {
      display: flex; gap: 6px; padding: 6px 10px 5px;
      background: rgba(0,0,0,0.18); border-bottom: 1px solid rgba(0,200,150,0.07);
      flex-wrap: wrap;
    }
    .t-filter-input {
      flex: 1; min-width: 100px; background: rgba(0,0,0,0.3);
      border: 1px solid rgba(0,200,150,0.18); border-radius: 6px;
      color: #d6efea; font-size: 12px; padding: 4px 8px; outline: none;
      transition: border-color .2s;
    }
    .t-filter-input:focus { border-color: rgba(0,200,150,0.5); }
    .t-filter-input::placeholder { color: #2a5050; }
    .t-filter-select {
      background: rgba(0,0,0,0.3); border: 1px solid rgba(0,200,150,0.18);
      border-radius: 6px; color: #d6efea; font-size: 12px; padding: 4px 6px;
      outline: none; cursor: pointer; max-width: 130px;
    }
    .t-filter-select option { background: #0a1628; color: #d6efea; }
    .t-filter-clear {
      background: none; border: none; color: #2a5050; cursor: pointer;
      font-size: 14px; padding: 2px 4px; border-radius: 4px; transition: color .15s;
    }
    .t-filter-clear:hover { color: #d6efea; }

    /* Barra de ações que aparece quando há itens selecionados */
    .sel-bar {
      display: none; align-items: center; gap: 8px;
      padding: 5px 10px; background: rgba(255,80,80,0.08);
      border-bottom: 1px solid rgba(255,107,107,0.18); font-size: 12px;
    }
    .sel-bar .sel-count { color: #ff9090; flex: 1; font-weight: 600; }
    .btn-soma-sel {
      background: rgba(99, 102, 241, 0.15);
      border: 1px solid rgba(99, 102, 241, 0.35);
      border-radius: 6px;
      color: #a5b4fc;
      padding: 4px 10px;
      font-size: 12px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 5px;
      white-space: nowrap;
    }
    .btn-soma-sel:hover { background: rgba(99, 102, 241, 0.28); }

    .btn-del-sel {
      background: rgba(220,50,50,0.22); border: 1px solid rgba(220,50,50,0.35);
      color: #ff8080; border-radius: 6px; padding: 3px 11px; cursor: pointer;
      font-size: 12px; transition: background .2s;
    }
    .btn-del-sel:hover { background: rgba(220,50,50,0.42); }
    .btn-clear-sel {
      background: none; border: none; color: #2a5050; cursor: pointer;
      font-size: 12px; padding: 2px 6px; border-radius: 4px; transition: color .15s;
    }
    .btn-clear-sel:hover { color: #d6efea; }

    /* Coluna do checkbox */
    .th-cb, .td-cb { width: 30px; text-align: center; padding: 0 4px !important; }
    .th-cb input[type=checkbox], .td-cb input[type=checkbox] {
      width: 14px; height: 14px; cursor: pointer; accent-color: #00c896;
      vertical-align: middle;
    }
    /* Linha selecionada */
    tr.tr-sel td { background: rgba(0,200,150,0.07) !important; }

/* ─── ONBOARDING ──────────────────────────────────────────── */
#ob-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: linear-gradient(180deg, #081620 0%, #0b1d2a 100%);
  display: none;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  font-family: inherit;
}
#ob-track {
  flex: 1;
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  min-height: 0;
}
.ob-slide {
  min-width: 100%;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 40px 20px;
  text-align: center;
  gap: 10px;
}
.ob-visual { margin-bottom: 8px; }
.ob-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #00c896;
  opacity: 0.85;
}
.ob-title {
  font-size: clamp(21px, 5vw, 27px);
  font-weight: 800;
  color: #d6efea;
  line-height: 1.3;
  margin: 4px 0 0;
}
.ob-desc {
  font-size: clamp(13px, 3vw, 15px);
  color: #5a8888;
  line-height: 1.65;
  margin: 2px 0 0;
  max-width: 360px;
}
.ob-icon-box {
  width: 140px;
  height: 140px;
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ob-icon-box i { font-size: 72px; }
#ob-bottom {
  padding: 16px 32px clamp(28px, 7vw, 52px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
#ob-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ob-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 200, 150, 0.18);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.ob-dot.ob-dot-ativo {
  background: #00c896;
  width: 26px;
  border-radius: 4px;
}
#ob-btn-prox {
  background: linear-gradient(135deg, #00c896, #009e78);
  border: none;
  border-radius: 16px;
  padding: 16px 52px;
  color: #06111a;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.5px;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 200, 150, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#ob-btn-prox:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 200, 150, 0.35);
}
#ob-skip {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: none;
  color: #2a4a4a;
  font-size: 13px;
  cursor: pointer;
  z-index: 2;
  font-family: inherit;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.2s;
}
#ob-skip:hover { color: #5a8080; }
@media (max-width: 480px) {
  .ob-slide { padding: 40px 28px 16px; gap: 8px; }
  .ob-icon-box { width: 120px; height: 120px; }
  .ob-icon-box i { font-size: 60px; }
  #ob-btn-prox { padding: 14px 40px; min-width: 160px; }
}

/* ── JULIUS FACE FLUTUANTE — mobile sheet ───────────────── */
@keyframes jmob-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}
#mob-ia-sheet {
  /* Garante altura suficiente pro rosto + chat */
  max-height: 90dvh !important;
}

/* ── JULIUS FAB (desktop floating bubble) ──────────────── */
/* keyframes fora do @media pra garantir compatibilidade */
@keyframes jfab-glow {
  0%, 100% { box-shadow: 0 4px 28px rgba(0,0,0,0.5), 0 0 12px rgba(0,200,150,0.1); }
  50%       { box-shadow: 0 4px 28px rgba(0,0,0,0.5), 0 0 28px rgba(0,200,150,0.32); }
}
/* Padrão: oculto em qualquer tela */
#julius-fab-desk {
  display: none !important;
  position: fixed !important;
  bottom: 28px !important;
  right: 28px !important;
}
/* Desktop: mostra a bolha */
@media (min-width: 769px) {
  #julius-fab-desk {
    display: flex !important;
    align-items: center;
    gap: 10px;
    position: fixed !important;
    bottom: 28px !important;
    right: 28px !important;
    background: linear-gradient(135deg, #081818 0%, #0d2424 100%);
    border: 1.5px solid rgba(0,200,150,0.45);
    border-radius: 50px;
    padding: 11px 20px 11px 13px;
    cursor: pointer;
    color: #d6efea;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .2px;
    z-index: 890;
    box-shadow: 0 4px 28px rgba(0,0,0,0.5), 0 0 12px rgba(0,200,150,0.1);
    transition: border-color .2s, transform .2s, box-shadow .2s;
    animation: jfab-glow 2.8s ease-in-out infinite;
  }
  #julius-fab-desk:hover {
    border-color: rgba(0,200,150,0.75);
    transform: translateY(-3px);
    box-shadow: 0 8px 36px rgba(0,0,0,0.5), 0 0 32px rgba(0,200,150,0.25);
    animation: none;
  }
  /* Julius panel abre de baixo pra cima no desktop */
  #julius-panel {
    top: auto !important;
    bottom: 130px !important;
    right: 28px !important;
  }
  /* Toolbar button e FAB somem no desktop — Julius face assume o papel */
  #btn-julius, #julius-fab-desk { display: none !important; }
}

/* ── TUTORIAL — Julius flutuante narrador ───────────────── */

/* Wrapper do Julius + bolha: posicionado via JS */
#tut-julius-wrap {
  pointer-events: all;
}

/* Float animation do rosto */
@keyframes tut-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

/* Bolha de fala — grande e destacada */
#tut-card {
  background: #081818;
  border: 1.5px solid rgba(0,200,150,0.45);
  border-radius: 4px 20px 20px 20px;  /* canto superior esquerdo = onde está o rosto */
  padding: 22px 24px 18px;
  width: 400px;
  box-shadow: 0 12px 56px rgba(0,0,0,0.75), 0 0 32px rgba(0,200,150,0.12);
  margin-top: -8px;  /* leve sobreposição com o rosto */
}

/* Animação de entrada da bolha */
@keyframes tut-card-pop {
  0%   { opacity:0; transform: scale(0.94) translateY(8px); }
  100% { opacity:1; transform: scale(1)    translateY(0); }
}
#tut-julius-wrap.tut-in #tut-card {
  animation: tut-card-pop 0.25s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes tut-face-pop {
  0%   { opacity:0; transform: scale(0.8); }
  100% { opacity:1; transform: scale(1); }
}
#tut-julius-wrap.tut-in #tut-face-outer {
  animation: tut-face-pop 0.3s cubic-bezier(.34,1.56,.64,1) forwards;
}

/* Texto da fala */
#tut-text {
  font-size: 15px;
  color: #d6efea;
  line-height: 1.75;
}

/* Botões */
#tut-skip {
  background: none; border: none; color: #3a6060;
  font-size: 12px; cursor: pointer; padding: 2px 0;
  transition: color .15s;
}
#tut-skip:hover { color: #7ae8c8; }
#tut-next {
  background: linear-gradient(135deg, rgba(0,200,150,0.18), rgba(0,200,150,0.1));
  border: 1.5px solid rgba(0,200,150,0.45);
  color: #00c896; border-radius: 10px;
  padding: 10px 22px; font-size: 14px; font-weight: 800;
  cursor: pointer; transition: all .15s;
  letter-spacing: .2px;
}
#tut-next:hover {
  background: rgba(0,200,150,0.28);
  border-color: rgba(0,200,150,0.7);
}

/* Palavras do karaoke */
.tw    { color: rgba(214,239,234,0.28); transition: color .08s, text-shadow .08s; }
.tw-on { color: #00ffaa; text-shadow: 0 0 10px rgba(0,255,170,0.55); font-weight: 700; }
.tw-ok { color: #d6efea; }

/* Dots */
#tut-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.tut-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(0,200,150,0.2);
  transition: background .2s, transform .2s;
}
.tut-dot.active {
  background: #00c896;
  transform: scale(1.3);
}

/* Spotlight no elemento destacado */
.tut-spotlight {
  position: relative !important;
  z-index: 9950 !important;
  outline: 3px solid #00c896 !important;
  outline-offset: 8px !important;
  border-radius: 10px !important;
  animation: tut-ring 1.4s ease-in-out infinite !important;
}
@keyframes tut-ring {
  0%, 100% { outline-color: rgba(0,200,150,0.95); }
  50%       { outline-color: rgba(0,200,150,0.3); }
}

/* Julius FAB: glow durante tutorial */
#julius-fab-desk.tut-talking {
  border-color: rgba(0,200,150,0.75) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 32px rgba(0,200,150,0.5) !important;
  animation: none !important;
}

/* Mobile: wrap full-width, face menor, bolha compacta */
@media (max-width: 768px) {
  #tut-julius-wrap { width: calc(100vw - 20px) !important; }
  #tut-julius-svg  { width: 72px !important; height: 72px !important; }
  #tut-card        { width: 100%; padding: 14px 16px 12px; border-radius: 4px 14px 14px 14px; }
  #tut-text        { font-size: 13px !important; line-height: 1.65 !important; }
  #tut-next        { padding: 8px 16px; font-size: 13px; }
  #tut-card::before, #tut-card::after { display: none !important; }
}

/* Eleva o tabbar quando o tutorial está destacando um elemento dentro dele */
#mob-tabbar.tut-spotlight-tabbar {
  z-index: 9951 !important;
}

/* ── SWIPE HINTS ─────────────────────────────────────────── */
.swipe-hint-mob {
  display: none;
  align-self: flex-end;
  margin: 6px 0 4px;
  background: rgba(0,200,150,0.10);
  border: 1px solid rgba(0,200,150,0.28);
  border-radius: 20px;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(0,200,150,0.85);
  align-items: center;
  gap: 6px;
  pointer-events: none;
  animation: swipe-hint-right 1.8s ease-in-out infinite;
}
.swipe-hint-mob.swipe-hint-left {
  align-self: flex-start;
  animation-name: swipe-hint-left;
}
@keyframes swipe-hint-right {
  0%, 100% { opacity: 0.65; transform: translateX(0); }
  50%       { opacity: 1;    transform: translateX(4px); }
}
@keyframes swipe-hint-left {
  0%, 100% { opacity: 0.65; transform: translateX(0); }
  50%       { opacity: 1;    transform: translateX(-4px); }
}

