/* =========================================================
   MOBILE ULTRA OPTIMIZED – SAFE MODE
   ATIVA SOMENTE ≤ 768px
   ========================================================= */
@media (max-width: 768px) {
  .app-main {
    transform: scale(0.8);
    transform-origin: top center;

    width: 116.111%;        /* 1 / 0.9 */
    margin-left: -8.555%;   /* centraliza perfeitamente */

    will-change: transform;
  }

  /* IMPORTANTE: não escala header nem bottom bar */
  .topbar,
  .side-nav {
    transform: none !important;
  }
  /* ========================
     BASE MOBILE
     ======================== */
  html, body {
    height: auto;
    min-height: 100svh;
    overflow-x: hidden;
  }

  body {
    font-size: 14px;
    line-height: 1.4;
  }

  /* desativa zoom do painel no mobile */
  body.painel-zoom {
    zoom: 1 !important;
    transform: none !important;
  }

  /* ========================
     LAYOUT GERAL
     ======================== */
  .app-shell {
    flex-direction: column;
    min-height: 100svh;
  }

  /* ========================
     SIDEBAR → BOTTOM BAR
     ======================== */
  .side-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    padding: 6px 10px;
    border-right: none;
    border-top: 1px solid #1c1c1c;
    z-index: 5000;
  }

  .side-logo {
    display: none;
  }

  .side-buttons {
    flex-direction: row;
    gap: 10px;
    margin: 0;
  }

  .side-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 18px;
  }

  /* remove hover fake */
  .side-btn:hover {
    transform: none;
    box-shadow: none;
  }

  /* ========================
     TOPBAR
     ======================== */
  .topbar {
    padding: 10px 12px;
    gap: 8px;
  }

  .topbar-left {
    gap: 8px;
  }

  .topbar-search {
    display: none; /* busca pesada → desktop only */
  }

  .top-pill {
    font-size: 11px;
    padding: 6px 10px;
  }

  .topbar-user span {
    display: none;
  }

  /* ========================
     MAIN AREA
     ======================== */
  .app-main {
    padding-bottom: 74px; /* espaço da bottom bar */
  }

  .main-area {
    padding: 12px;
    gap: 12px;
    overflow-x: hidden;
  }

  /* ========================
     SECTIONS / CARDS
     ======================== */
  .section {
    padding: 12px;
    border-radius: 12px;
  }

  /* ========================
     NOTIFICAÇÕES
     ======================== */
  .notifications-grid {
    grid-template-columns: 1fr;
  }

  .notification-card {
    padding: 12px;
  }

  .notification-title {
    font-size: 14px;
  }

  .notification-body {
    font-size: 13px;
  }

  /* ========================
     MÓDULOS (GRID)
     ======================== */
  .modules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .module-card-thumb {
    padding-top: 70%;
  }

  .module-card-title {
    font-size: 13px;
  }

  .module-card-link:hover {
    transform: none;
    box-shadow: none;
    outline: none;
  }

  /* ========================
     MODAL
     ======================== */
  .modal {
    padding: 10px;
    align-items: flex-end;
  }

  .modal-content {
    margin: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 14px 14px 16px;
    animation: modalUp 0.25s ease;
  }

  @keyframes modalUp {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
  }

  /* ========================
     LOGIN FLOAT
     ======================== */
  .login-float-card {
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
    padding: 16px;
  }

  .login-float-title {
    font-size: 15px;
  }

  .login-float-body {
    font-size: 13px;
  }

  /* ========================
     REVENDEDOR
     ======================== */
  .rev-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .metrics {
    flex-direction: column;
    gap: 8px;
  }

  .metric-value {
    font-size: 18px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* ========================
     TABELAS
     ======================== */
  .table {
    font-size: 11px;
  }

  .table th,
  .table td {
    padding: 6px 4px;
    white-space: nowrap;
  }

  /* ========================
     VIEW 99x UBER
     ======================== */
  .c99x-wrap {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 12px;
  }

  .c99x-title {
    font-size: 16px;
  }

  .c99x-textarea {
    min-height: 120px;
  }

  .c99x-results {
    gap: 8px;
  }

  /* ========================
     SCROLLBAR (mobile friendly)
     ======================== */
  .main-area::-webkit-scrollbar {
    width: 4px;
  }

}


