
/* ===== MOBILE CSS SEPARADO ===== */
@media (max-width: 768px) {
    body {
        overflow: auto !important;
    }

    .app {
        grid-template-columns: 1fr !important;
        height: auto !important;
        min-height: 100vh;
    }

    .sidebar {
        display: none !important;
    }

    .content {
        padding: 16px !important;
        height: auto !important;
        overflow: visible !important;
    }

    .topbar,
    .cards,
    .panel-grid,
    .app-footer {
        display: none !important;
    }

    .mobile-summary-shell,
    .mobile-page-shell,
    .mobile-bottom-nav {
        display: block !important;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 9999;
        display: grid !important;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 8px;
        border-radius: 20px;
        background: rgba(8, 17, 31, 0.92);
        border: 1px solid var(--border);
        box-shadow: 0 20px 50px rgba(0,0,0,0.30);
        backdrop-filter: blur(12px);
    }

    .mobile-bottom-nav a {
        min-height: 48px;
        text-decoration: none;
        color: #dbe7ff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 14px;
        font-size: 13px;
        font-weight: 700;
    }

    .mobile-bottom-nav a.active {
        background: linear-gradient(135deg, var(--primary), var(--primary-strong));
        color: #fff;
    }

    .mobile-page-shell {
        min-height: 100vh;
        padding: 18px 16px 98px;
    }

    .mobile-page-header {
        display: flex;
        justify-content: space-between;
        align-items: start;
        gap: 12px;
        margin-bottom: 16px;
    }

    .mobile-page-header h1 {
        font-size: 28px;
        line-height: 1.05;
        margin-bottom: 4px;
    }

    .mobile-page-header p {
        color: var(--text-soft);
    }

    .mobile-page-card,
    .mobile-summary-card {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 24px;
        box-shadow: var(--shadow);
        padding: 16px;
        margin-bottom: 16px;
        backdrop-filter: blur(10px);
    }

    .mobile-summary-head {
        display: flex;
        justify-content: space-between;
        align-items: start;
        gap: 12px;
        margin-bottom: 8px;
    }

    .mobile-summary-head h3,
    .mobile-list-title {
        font-size: 20px;
    }

    .mobile-back-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 0 14px;
        text-decoration: none;
        border-radius: 14px;
        background: var(--surface);
        border: 1px solid var(--border);
        color: var(--text);
        white-space: nowrap;
    }

    .mobile-summary-shell,
    .mobile-page-shell,
    .mobile-bottom-nav {
        display: block;
    }

    .mobile-summary-shell {
        display: block !important;
    }

    .mobile-chart-list {
        display: grid;
        gap: 14px;
        margin-top: 10px;
    }

    .mobile-chart-label {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 6px;
        font-size: 13px;
    }

    .mobile-bar {
        width: 100%;
        height: 10px;
        border-radius: 999px;
        background: var(--bg-soft);
        border: 1px solid var(--border);
        overflow: hidden;
    }

    .mobile-bar-fill {
        height: 100%;
        border-radius: 999px;
        transition: width .35s ease;
    }

    .mobile-bar-fill.success { background: linear-gradient(90deg, var(--success), #6ee7a2); }
    .mobile-bar-fill.warning { background: linear-gradient(90deg, var(--warning), #ffd66b); }
    .mobile-bar-fill.danger { background: linear-gradient(90deg, var(--danger), #ff8e8e); }

    .mobile-quick-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-top: 14px;
    }

    .mobile-action-btn {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        min-height: 48px;
        border-radius: 16px;
        text-decoration: none;
        background: linear-gradient(135deg, var(--primary), var(--primary-strong));
        color: #fff;
        font-weight: 700;
        box-shadow: var(--shadow);
    }

    .mobile-action-btn.secondary {
        background: var(--surface);
        color: var(--text);
        border: 1px solid var(--border);
    }

    .mobile-expenses-list {
        display: grid;
        gap: 12px;
    }

    .expense-top {
        flex-direction: column;
    }

    .expense-top h4 {
        font-size: 20px !important;
    }

    .top-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* oculto no desktop */
@media (min-width: 769px) {
    .mobile-summary-shell,
    .mobile-page-shell,
    .mobile-bottom-nav {
        display: none !important;
    }
}


/* ===== MOBILE TEMA GLOBAL + ADMIN ===== */
.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-theme-toggle {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 14px !important;
}

.profile-mobile-shell {
    display: none;
}

.admin-content-shell {
    min-height: 100vh;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.inline-form {
    margin: 0;
}

.btn-success-lite {
    background: rgba(74,222,128,0.14);
    color: var(--success);
    border-color: rgba(74,222,128,0.18);
}

.user-role {
    display: inline-flex;
    margin-top: 6px;
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(91,140,255,0.16);
    color: #dbe7ff;
}

@media (max-width: 768px) {
    .auth-page .auth-shell {
        grid-template-columns: 1fr !important;
    }

    .auth-page .auth-brand {
        padding: 22px !important;
    }

    .auth-page .auth-points {
        display: none !important;
    }

    .auth-page .auth-card {
        padding: 20px !important;
    }

    .profile-mobile-shell {
        display: block;
        padding: 18px 16px 0;
    }

    .content[style*="max-width:780px"] {
        padding: 0 16px 98px !important;
        max-width: none !important;
    }

    .content[style*="max-width:780px"] .panel {
        margin-top: 0 !important;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }
}
