/* ============================================
   📱 MOBILE EXPERIENCE PREMIUM (iOS/macOS Style)
   ============================================ */

/* --- 1. Top Bar Mobile (App Header) --- */
.mobile-app-header {
    display: none;
    /* Desktop hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    /* Altura padrão mobile */
    background: var(--macos-bg-toolbar);
    /* Mesma do desktop */
    /* Mesma do desktop */
    /* backdrop-filter removido */
    /* -webkit-backdrop-filter removido */
    border-bottom: 1px solid var(--macos-divider);
    z-index: 10001;
    /* Acima de tudo */
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mobile-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-header-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--macos-text-primary);
    letter-spacing: -0.01em;
}

/* --- 2. Botão Menu (Hamurger Integrado) --- */
.mobile-menu-trigger {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    /* Circular touch target */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--macos-text-primary);
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: -8px;
    /* Alinhamento visual */
}

.mobile-menu-trigger:active {
    background: rgba(255, 255, 255, 0.1);
}

/* --- 3. Ajustes Globais Mobile (Scaling) --- */
@media (max-width: 768px) {
    .mobile-app-header {
        display: flex !important;
    }

    /* Reset do botão antigo se existir */
    .mobile-menu-toggle {
        display: none !important;
    }

    /* Conteúdo Principal */
    .macos-main-content {
        margin-left: 0 !important;
        margin-top: 0 !important;
        padding-top: 80px !important;
        /* Header (60) + space (20) */
        padding-left: 16px !important;
        padding-right: 16px !important;
        min-height: 100vh;
    }

    /* --- Sidebar Off-Canvas --- */
    .macos-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        /* Largura confortável */
        transform: translateX(-100%);
        /* Escondido por padrão */
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        /* iOS Slide easing */
        z-index: 10002;
        /* Acima do header */
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.3);
        /* Sombra suave */
        border-right: none;
        /* Remover borda interna no mobile */
    }

    .macos-sidebar.mobile-open {
        transform: translateX(0);
    }

    /* --- Overlay --- */
    .mobile-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        background: rgba(0, 0, 0, 0.4);
        /* backdrop-filter removido */
        /* -webkit-backdrop-filter removido */
        z-index: 10001;
        /* Logo abaixo da sidebar */
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    /* --- Scaling de Elementos (Resolver 'Grande Demais') --- */

    /* 1. Cards menores */
    .macos-card {
        padding: 16px !important;
        /* Menos padding */
        border-radius: 12px !important;
    }

    /* 2. Fontes ajustadas */
    h1 {
        font-size: 24px !important;
    }

    h2 {
        font-size: 20px !important;
    }

    h3 {
        font-size: 18px !important;
    }

    .macos-stat-value {
        font-size: 24px !important;
        /* Números menores */
    }

    /* 3. Inputs mais compactos */
    .macos-input,
    .macos-select,
    .macos-btn {
        height: 44px;
        /* Touch target padrão mobile */
        font-size: 16px;
        /* Evita zoom no iOS inputs */
    }

    /* 4. Tabelas/Listas */
    .macos-list-item {
        padding: 12px 0 !important;
    }

    .macos-list-item-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }
}